x11: Fix last-minute edit bug
authorKristian Høgsberg <krh@bitplanet.net>
Wed, 12 Oct 2011 04:01:18 +0000 (00:01 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 12 Oct 2011 04:01:18 +0000 (00:01 -0400)
compositor/xserver-launcher.c

index 6dbf2a5..fe4caea 100644 (file)
@@ -213,13 +213,13 @@ wlsc_xserver_surface_activate(struct wlsc_surface *surface)
        struct wlsc_wm_window *window = get_wm_window(surface);
        struct wlsc_xserver *wxs = surface->compositor->wxs;
 
-       if (window == NULL && wxs && wxs->wm)
+       if (window)
+               wlsc_wm_activate(wxs->wm, window, XCB_TIME_CURRENT_TIME);
+       else if (wxs && wxs->wm)
                xcb_set_input_focus (wxs->wm->conn,
                                     XCB_INPUT_FOCUS_POINTER_ROOT,
                                     XCB_NONE,
                                     XCB_TIME_CURRENT_TIME);
-       else
-               wlsc_wm_activate(wxs->wm, window, XCB_TIME_CURRENT_TIME);
 }
 
 static void