diff --git a/ewmh.c b/ewmh.c index cce86e254..9b01460df 100644 --- a/ewmh.c +++ b/ewmh.c @@ -238,7 +238,7 @@ void ewmh_update_net_active_window(int phys_screen) { xcb_window_t win; - client_t *sel = focus_client_getcurrent(phys_screen); + client_t *sel = focus_client_getcurrent(globalconf.screens[phys_screen].workspace); win = sel ? sel->win : XCB_NONE; diff --git a/layouts/magnifier.c b/layouts/magnifier.c index 8e20f0c32..a78a260b8 100644 --- a/layouts/magnifier.c +++ b/layouts/magnifier.c @@ -37,7 +37,7 @@ layout_magnifier(workspace_t *ws) globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding); - focus = focus_client_getcurrent(screen); + focus = focus_client_getcurrent(ws); /* If focused window is not tiled, take the first one which is tiled. */ if(!IS_TILED(focus, screen)) diff --git a/layouts/max.c b/layouts/max.c index e348196ce..8737164ec 100644 --- a/layouts/max.c +++ b/layouts/max.c @@ -46,7 +46,7 @@ layout_max(workspace_t *ws) area.height += 2 * c->border; } - if((focus = focus_client_getcurrent(screen)) + if((focus = focus_client_getcurrent(ws)) && IS_TILED(focus, screen)) client_raise(focus); } diff --git a/widgets/tasklist.c b/widgets/tasklist.c index 11833dd7e..0ec282683 100644 --- a/widgets/tasklist.c +++ b/widgets/tasklist.c @@ -57,7 +57,7 @@ tasklist_isvisible(client_t *c, int screen, showclient_t show) case ShowWorkspace: return client_isvisible(c, screen); case ShowFocus: - return (c == focus_client_getcurrent(screen)); + return (c == focus_client_getcurrent(globalconf.screens[screen].workspace)); } return false; }