Commit 329107a7 authored by Tinu Weber's avatar Tinu Weber

unmapnotify: Stop using updatefocus; remove now unused updatefocus

AT LAST!
parent 139971f1
......@@ -71,7 +71,6 @@ static void sigchld(int);
static size_t unifyscreens(XineramaScreenInfo **, size_t);
static void unmapnotify(XEvent *);
static void updateclient(struct client *);
static void updatefocus(void);
static void updategeom(void);
static void updatemon(struct monitor *, int, int, unsigned int, unsigned int);
static void updatetransient(struct client *);
......@@ -1647,8 +1646,8 @@ unmapnotify(XEvent *e)
workspace_detach_client(ws, c);
if (ws->mon) {
monitor_restack(ws->mon);
monitor_arrange(ws->mon);
updatefocus();
} else if (workspace_isempty(ws)) {
state_detach_workspace(state, ws);
workspace_destroy(ws);
......@@ -1690,45 +1689,6 @@ updateclient(struct client *c)
}
}
void
updatefocus(void)
{
unsigned int i, j;
struct monitor *mon;
for (j = 0; j < seat->monitors->size; ++j) {
mon = seat->monitors->elements[j];
if (!mon->selws)
continue;
for (i = 0; i < mon->selws->tiled->size; ++i)
client_set_focus(mon->selws->tiled->elements[i], false);
for (i = 0; i < mon->selws->floating->size; ++i)
client_set_focus(mon->selws->floating->elements[i], false);
}
if (state->scratchpad.client
&& state->scratchpad.monitor == seat->selmon) {
/* focus scratchpad */
if (state->scratchpad.monitor == seat->selmon) {
client_set_focus(state->scratchpad.client, true);
XRaiseWindow(x11.dpy, state->scratchpad.client->win);
} else {
client_set_focus(state->scratchpad.client, false);
}
} else if (seat->selmon->selws) {
/* focus workspace */
if (workspace_isempty(seat->selmon->selws))
XSetInputFocus(x11.dpy, x11.root, RevertToPointerRoot,
CurrentTime);
else
client_set_focus(seat->selmon->selws->selcli, true);
} else {
/* focus nothing */
XSetInputFocus(x11.dpy, x11.root, RevertToPointerRoot,
CurrentTime);
}
}
void
updategeom(void)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment