Proper workaround for issue #555
This commit is contained in:
parent
d2b32d528f
commit
a6879ea2a5
3 changed files with 17 additions and 1 deletions
15
src/panel.c
15
src/panel.c
|
@ -603,6 +603,21 @@ void place_panel_all_desktops(Panel *p)
|
|||
num_atoms);
|
||||
}
|
||||
|
||||
void replace_panel_all_desktops(Panel *p)
|
||||
{
|
||||
XClientMessageEvent m;
|
||||
memset(&m, 0, sizeof(m));
|
||||
m.type = ClientMessage;
|
||||
m.send_event = True;
|
||||
m.display = server.display;
|
||||
m.window = p->main_win;
|
||||
m.message_type = server.atom._NET_WM_DESKTOP;
|
||||
m.format = 32;
|
||||
m.data.l[0] = ALL_DESKTOPS;
|
||||
XSendEvent(server.display, server.root_win, False, SubstructureRedirectMask | SubstructureNotifyMask, (XEvent *)&m);
|
||||
XSync(server.display, False);
|
||||
}
|
||||
|
||||
void set_panel_properties(Panel *p)
|
||||
{
|
||||
XStoreName(server.display, p->main_win, panel_window_name);
|
||||
|
|
|
@ -155,6 +155,7 @@ void render_panel(Panel *panel);
|
|||
|
||||
void set_panel_items_order(Panel *p);
|
||||
void place_panel_all_desktops(Panel *p);
|
||||
void replace_panel_all_desktops(Panel *p);
|
||||
void set_panel_properties(Panel *p);
|
||||
|
||||
// draw background panel
|
||||
|
|
|
@ -985,7 +985,7 @@ void event_property_notify(XEvent *e)
|
|||
Panel *p = &panels[i];
|
||||
if (win == p->main_win) {
|
||||
if (at == server.atom._NET_WM_DESKTOP && get_window_desktop(p->main_win) != ALL_DESKTOPS)
|
||||
place_panel_all_desktops(p);
|
||||
replace_panel_all_desktops(p);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue