Select our events on new after the reparent
Together with the previous commit, this makes us not lose clients across restarts any more. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
0682499895
commit
84526dd630
|
@ -172,9 +172,6 @@ scan(void)
|
|||
*(geom_wins[i]), NULL)))
|
||||
continue;
|
||||
|
||||
/* The window can be mapped, so force it to be undrawn for startup */
|
||||
xcb_unmap_window(globalconf.connection, wins[i]);
|
||||
|
||||
client_manage(wins[i], geom_r, phys_screen, true);
|
||||
|
||||
p_delete(&geom_r);
|
||||
|
|
|
@ -451,8 +451,6 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int phys_screen,
|
|||
startup_id_q = xcb_get_property(globalconf.connection, false, w,
|
||||
_NET_STARTUP_ID, XCB_GET_PROPERTY_TYPE_ANY, 0, UINT_MAX);
|
||||
|
||||
xcb_change_window_attributes(globalconf.connection, w, XCB_CW_EVENT_MASK, select_input_val);
|
||||
|
||||
/* Make sure the window is automatically mapped if awesome exits or dies. */
|
||||
xcb_change_save_set(globalconf.connection, XCB_SET_MODE_INSERT, w);
|
||||
|
||||
|
@ -482,6 +480,11 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int phys_screen,
|
|||
});
|
||||
xcb_reparent_window(globalconf.connection, w, c->frame_window, 0, 0);
|
||||
xcb_map_window(globalconf.connection, w);
|
||||
|
||||
/* Do this now so that we don't get any events for the above
|
||||
* (Else, reparent could cause an UnmapNotify) */
|
||||
xcb_change_window_attributes(globalconf.connection, w, XCB_CW_EVENT_MASK, select_input_val);
|
||||
|
||||
luaA_object_emit_signal(globalconf.L, -1, "property::window", 0);
|
||||
|
||||
/* The frame window gets the border, not the real client window */
|
||||
|
|
Loading…
Reference in New Issue