event: map window if they ask for
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
bf253ba3bc
commit
dda116fea0
17
event.c
17
event.c
|
@ -24,6 +24,7 @@
|
|||
#include <xcb/randr.h>
|
||||
|
||||
#include "event.h"
|
||||
#include "tag.h"
|
||||
#include "window.h"
|
||||
#include "ewmh.h"
|
||||
#include "client.h"
|
||||
|
@ -442,7 +443,21 @@ event_handle_maprequest(void *data __attribute__ ((unused)),
|
|||
xcb_map_window(connection, ev->window);
|
||||
xembed_window_activate(connection, ev->window);
|
||||
}
|
||||
else if(!(c = client_getbywin(ev->window)))
|
||||
else if((c = client_getbywin(ev->window)))
|
||||
{
|
||||
tag_array_t *tags = &globalconf.screens[c->screen].tags;
|
||||
|
||||
xcb_map_window(globalconf.connection, ev->window);
|
||||
|
||||
/* add tags currently shown */
|
||||
for(int i = 0; i < tags->len; i++)
|
||||
if(tags->tab[i]->selected)
|
||||
tag_client(c, tags->tab[i]);
|
||||
|
||||
/* it will be raised, so just update ourself */
|
||||
client_raise(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
geom_c = xcb_get_geometry_unchecked(connection, ev->window);
|
||||
|
||||
|
|
Loading…
Reference in New Issue