From 78972f141478d4bbd8cfb67c557b98a23fb7865c Mon Sep 17 00:00:00 2001 From: Reginald Kennedy Date: Thu, 23 Aug 2012 08:29:23 +0800 Subject: [PATCH] Fix keyboard move and resize operation delay. Fix debug mode segfault in unmapnotify. --- spectrwm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spectrwm.c b/spectrwm.c index 6f25072..a94e2cd 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -4357,7 +4357,6 @@ search_resp_uniconify(char *resp, unsigned long len) if (strncmp(s, resp, len) == 0) { /* XXX this should be a callback to generalize */ set_swm_iconic(win, 0); - xcb_flush(conn); free(s); break; } @@ -4846,6 +4845,7 @@ resize_step(struct swm_region *r, union arg *args) return; resize(win, args); + focus_flush(); } #define SWM_MOVE_STEPS (50) @@ -4992,6 +4992,7 @@ move_step(struct swm_region *r, union arg *args) return; move(win, args); + focus_flush(); } /* user/key callable function IDs */ @@ -7792,7 +7793,7 @@ unmapnotify(xcb_unmap_notify_event_t *e) stack(); DNPRINTF(SWM_D_EVENT, "unmapnotify: focus_pending: 0x%x\n", - ws->focus_pending->id); + WINID(ws->focus_pending)); if (focus_mode != SWM_FOCUS_FOLLOW) { if (ws->focus_pending) { @@ -7803,8 +7804,10 @@ unmapnotify(xcb_unmap_notify_event_t *e) focus_flush(); } else if (focus_mode == SWM_FOCUS_FOLLOW) { - if (ws->r) + if (ws->r) { focus_win(get_pointer_win(ws->r->s->root)); + xcb_flush(conn); + } } } -- 2.39.2