]> code.delx.au - spectrwm/commitdiff
Fix focus on iconify.
authorReginald Kennedy <rk@rejii.com>
Mon, 20 Aug 2012 18:17:01 +0000 (02:17 +0800)
committerReginald Kennedy <rk@rejii.com>
Mon, 20 Aug 2012 18:39:38 +0000 (02:39 +0800)
Remove some double blank lines.

spectrwm.c

index bd460e9b0df3f7dc1bb2956351be909a9465cd58..932f11ff7550d15e180d74ad466fa5b3b43491ad 100644 (file)
@@ -851,7 +851,6 @@ get_swm_iconic(struct ws_win *win)
        int32_t                         v = 0;
        xcb_get_property_reply_t        *pr = NULL;
 
-
        pr = xcb_get_property_reply(conn,
            xcb_get_property(conn, 0, win->id, a_swm_iconic,
            XCB_ATOM_INTEGER, 0, 1), NULL);
@@ -3029,7 +3028,6 @@ swapwin(struct swm_region *r, union arg *args)
        struct ws_win           *cur_focus;
        struct ws_win_list      *wl;
 
-
        DNPRINTF(SWM_D_WS, "swapwin: id: %d, screen[%d]:%dx%d+%d+%d, ws: %d\n",
            args->id, r->s->idx, WIDTH(r), HEIGHT(r), X(r), Y(r), r->ws->idx);
 
@@ -4434,7 +4432,6 @@ wkill(struct swm_region *r, union arg *args)
        xcb_flush(conn);
 }
 
-
 int
 floating_toggle_win(struct ws_win *win)
 {
@@ -4898,7 +4895,6 @@ move_step(struct swm_region *r, union arg *args)
        move(win, args);
 }
 
-
 /* user/key callable function IDs */
 enum keyfuncid {
        KF_BAR_TOGGLE,
@@ -6507,7 +6503,6 @@ struct config_option configopt[] = {
        { "layout",                     setlayout,      0 },
 };
 
-
 int
 conf_load(char *filename, int keymapping)
 {
@@ -6916,7 +6911,6 @@ manage_window(xcb_window_t id, uint16_t mapped)
                update_window(win);
        }
 
-
        /* Select which X events to monitor and set border pixel color. */
        wa[0] = win->s->c[SWM_S_COLOR_UNFOCUS].pixel;
        wa[1] = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_PROPERTY_CHANGE |
@@ -7570,12 +7564,14 @@ propertynotify(xcb_property_notify_event_t *e)
                        focus_flush();
                        return;
                } else if (e->state == XCB_PROPERTY_NEW_VALUE) {
+                       win->ws->focus_pending = get_focus_prev(win);
                        unfocus_win(win);
                        unmap_window(win);
 
                        if (win->ws->r) {
-                               focus_win(get_focus_prev(win));
                                stack();
+                               focus_win(win->ws->focus_pending);
+                               win->ws->focus_pending = NULL;
                                focus_flush();
                        }
                }