systray: move KDE handling into client_manage()

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-30 13:09:24 +02:00
parent 207f06d720
commit 14061b4e7a
2 changed files with 7 additions and 17 deletions

View file

@ -35,6 +35,7 @@
#include "lua.h"
#include "stack.h"
#include "mouse.h"
#include "systray.h"
#include "layouts/floating.h"
#include "common/markup.h"
@ -376,6 +377,12 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int screen)
xcb_change_window_attributes(globalconf.connection, w, XCB_CW_EVENT_MASK, select_input_val);
if(systray_iskdedockapp(w))
{
systray_request_handle(w, screen_virttophys(screen), NULL);
return;
}
c = p_new(client_t, 1);
c->screen = screen_get_bycoord(globalconf.screens_info, screen, wgeom->x, wgeom->y);

17
event.c
View file

@ -460,23 +460,6 @@ event_handle_maprequest(void *data __attribute__ ((unused)),
client_raise(c);
}
}
else if(systray_iskdedockapp(ev->window))
{
geom_c = xcb_get_geometry_unchecked(connection, ev->window);
if(!(geom_r = xcb_get_geometry_reply(connection, geom_c, NULL)))
{
ret = -1;
goto bailout;
}
/* get real screen */
for(iter = xcb_setup_roots_iterator(xcb_get_setup(connection)), screen_nbr = 0;
iter.rem && iter.data->root != geom_r->root; xcb_screen_next (&iter), ++screen_nbr);
systray_request_handle(ev->window, screen_nbr, NULL);
p_delete(&geom_r);
}
else
{
geom_c = xcb_get_geometry_unchecked(connection, ev->window);