From 5c8f4d24fa3008ca503d023d36500b709c94a4bc Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Sat, 3 Oct 2009 22:20:11 +0000 Subject: [PATCH] shuffle some stuff around to make more sense --- scrotwm.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/scrotwm.c b/scrotwm.c index e8361a7..edcd339 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -1193,14 +1193,14 @@ unfocus_win(struct ws_win *win) if (win->ws->r == NULL) return; - grabbuttons(win, 0); - XSetWindowBorder(display, win->id, - win->ws->r->s->c[SWM_S_COLOR_UNFOCUS].color); - if (win->ws->focus == win) { win->ws->focus = NULL; win->ws->focus_prev = win; } + + grabbuttons(win, 0); + XSetWindowBorder(display, win->id, + win->ws->r->s->c[SWM_S_COLOR_UNFOCUS].color); } void @@ -1233,12 +1233,11 @@ focus_win(struct ws_win *win) if (win->ws->r != NULL) { XSetWindowBorder(display, win->id, win->ws->r->s->c[SWM_S_COLOR_FOCUS].color); - grabbuttons(win, 1); if (win->ws->cur_layout->flags & SWM_L_MAPONFOCUS) XMapRaised(display, win->id); XSetInputFocus(display, win->id, RevertToPointerRoot, CurrentTime); - XSync(display, False); + grabbuttons(win, 1); } } @@ -1581,7 +1580,6 @@ stack(void) { } if (font_adjusted) font_adjusted--; - XSync(display, False); } void @@ -1996,7 +1994,6 @@ send_to_ws(struct swm_region *r, union arg *args) if (ScreenCount(display) > 1 || outputs > 1) winfocus = win; - unmap_window(win); TAILQ_REMOVE(&ws->winlist, win, entry); TAILQ_INSERT_TAIL(&nws->winlist, win, entry); -- 1.7.10.4