mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Add systray windows to the save-set
When an X11 client disconnects from the X server, all of its windows are destroyed. This also means that all the sub-windows of those windows are destroyed which is not necessary what one wants to happen. To work around this, X11 has a "save-set". All the windows that are in the save-set are reparented to their closest ancestor when they would normally be destroyed. This is just what this code needs. :) (The windows in the save-set are also mapped when they are saved, dunno if this hurts here or not) Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
2e0ea80cb3
commit
dcf2f03881
1 changed files with 4 additions and 0 deletions
|
@ -155,6 +155,10 @@ systray_request_handle(xcb_window_t embed_win, int phys_screen, xembed_info_t *i
|
|||
select_input_val);
|
||||
xwindow_set_state(embed_win, XCB_WM_STATE_WITHDRAWN);
|
||||
|
||||
/* we grab the window, but also make sure it's automatically reparented back
|
||||
* to the root window if we should die.
|
||||
*/
|
||||
xcb_change_save_set(globalconf.connection, XCB_SET_MODE_INSERT, embed_win);
|
||||
xcb_reparent_window(globalconf.connection, embed_win,
|
||||
globalconf.screens.tab[phys_screen].systray.window,
|
||||
0, 0);
|
||||
|
|
Loading…
Reference in a new issue