From 63043eca464b8647d0a915cb38df1f3992765239 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 15 Jun 2008 11:22:34 +0200 Subject: [PATCH] systray: fix systray initialization Signed-off-by: Julien Danjou --- systray.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/systray.c b/systray.c index 2072bc1d..81cc2a44 100644 --- a/systray.c +++ b/systray.c @@ -20,6 +20,7 @@ */ #include +#include #include #include "structs.h" @@ -39,10 +40,11 @@ systray_init(int phys_screen) xutil_intern_atom_request_t atom_systray_q, atom_manager_q; xcb_atom_t atom_systray; xcb_client_message_event_t ev; + xcb_screen_t *xscreen = xcb_aux_get_screen(globalconf.connection, phys_screen); char atom_name[22]; /* Send requests */ - atom_manager_q = xutil_intern_atom(globalconf.connection, &globalconf.atoms, atom_name); + atom_manager_q = xutil_intern_atom(globalconf.connection, &globalconf.atoms, "MANAGER"); snprintf(atom_name, sizeof(atom_name), "_NET_SYSTEM_TRAY_S%d", phys_screen); atom_systray_q = xutil_intern_atom(globalconf.connection, &globalconf.atoms, atom_name); @@ -65,6 +67,8 @@ systray_init(int phys_screen) globalconf.screens[phys_screen].systray->window, atom_systray, XCB_CURRENT_TIME); + + xcb_send_event(globalconf.connection, false, xscreen->root, XCB_EVENT_MASK_STRUCTURE_NOTIFY, (char *) &ev); } /** Handle a systray request.