Commit a6879ea2 authored by o9000's avatar o9000

Proper workaround for issue #555

parent d2b32d52
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment