diff --git a/common/xembed.c b/common/xembed.c index 3f0d50fa4..d293af498 100644 --- a/common/xembed.c +++ b/common/xembed.c @@ -41,7 +41,7 @@ xembed_window_unembed(xcb_connection_t *connection, xcb_window_t child, xcb_wind * \param client The client to send message to. */ static inline void -xembed_focus_out (xcb_connection_t *c, xcb_window_t client) +xembed_focus_out(xcb_connection_t *c, xcb_window_t client) { xembed_message_send(c, client, XEMBED_FOCUS_OUT, 0, 0, 0); } diff --git a/systray.c b/systray.c index 1ef195e4d..7b9feb800 100644 --- a/systray.c +++ b/systray.c @@ -63,9 +63,11 @@ systray_request_handle(xcb_window_t embed_win, int phys_screen, xembed_info_t *i xembed_window_list_append(&globalconf.embedded, em); - xembed_embedded_notify(globalconf.connection, em->win, - globalconf.screens[phys_screen].systray->sw->window, - MIN(XEMBED_VERSION, em->info.version)); + /** \todo we should create a dedicated window for that */ + if(globalconf.screens[phys_screen].systray) + xembed_embedded_notify(globalconf.connection, em->win, + globalconf.screens[phys_screen].systray->sw->window, + MIN(XEMBED_VERSION, em->info.version)); if(em->info.flags & XEMBED_MAPPED) xcb_map_window(globalconf.connection, em->win);