diff options
author | okan | 2013-01-07 21:53:23 +0000 |
---|---|---|
committer | okan | 2013-01-07 21:53:23 +0000 |
commit | 4e7878b6c81f71a76583a323008e0e5809ff4b56 (patch) | |
tree | 9a9b999a684ee9a66365fea91418d3cf96b3a0cc | |
parent | 80c68d6798cb663a3a0b57818c2027a710c99f06 (diff) | |
download | cwm-4e7878b6c81f71a76583a323008e0e5809ff4b56.tar.gz |
fix menu/client placement in panning setups; XineramaQueryScreens gives
us the width of the psuedo screen, but here we need the edge instead
(xmax/ymax); just re-use w/h here for now.
Diffstat (limited to '')
-rw-r--r-- | client.c | 4 | ||||
-rw-r--r-- | menu.c | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: client.c,v 1.116 2013/01/06 01:01:26 okan Exp $ + * $OpenBSD: client.c,v 1.117 2013/01/07 21:53:23 okan Exp $ */ #include <sys/param.h> @@ -660,6 +660,8 @@ client_placecalc(struct client_ctx *cc) xu_ptr_getpos(sc->rootwin, &xmouse, &ymouse); xine = screen_find_xinerama(sc, xmouse, ymouse); + xine.w += xine.x; + xine.h += xine.y; xmouse = MAX(xmouse, xine.x) - cc->geom.w / 2; ymouse = MAX(ymouse, xine.y) - cc->geom.h / 2; @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: menu.c,v 1.50 2013/01/02 16:26:34 okan Exp $ + * $OpenBSD: menu.c,v 1.51 2013/01/07 21:53:23 okan Exp $ */ #include <sys/param.h> @@ -394,6 +394,8 @@ menu_draw(struct screen_ctx *sc, struct menu_ctx *mc, struct menu_q *menuq, } xine = screen_find_xinerama(sc, mc->x, mc->y); + xine.w += xine.x; + xine.h += xine.y; xsave = mc->x; ysave = mc->y; |