From e9ffab7d62af052c84e3a254ddf233f9b031652c Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Wed, 18 Aug 2010 19:41:47 +0200 Subject: [PATCH] Client: Fix client_get_prev/next not working when screen switching with mouse --- src/client.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/client.c b/src/client.c index d915cf4..c769cb1 100644 --- a/src/client.c +++ b/src/client.c @@ -93,6 +93,8 @@ client_get_next(void) { Client *c = NULL; + screen_get_sel(); + if(!sel || ishide(sel, selscreen)) return NULL; @@ -112,6 +114,8 @@ client_get_prev(void) { Client *c = NULL, *d; + screen_get_sel(); + if(!sel || ishide(sel, selscreen)) return NULL; @@ -745,6 +749,9 @@ client_manage(Window w, XWindowAttributes *wa, Bool ar) if(!conf.client.set_new_win_master) layout_set_client_master(c); + + cient_moveresize(c, c->geo, False); + return c; } @@ -1104,6 +1111,8 @@ client_update_attributes(Client *c) XChangeProperty(dpy, c->win, ATOM("_WMFS_ISFREE"), XA_CARDINAL, 32, PropModeReplace, (uchar*)&f, 1); + c->screen = screen_get_with_geo(c->geo.x, c->geo.y); + return; }