event: handle iconify request

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-07-28 17:13:30 +02:00
parent 7419a99827
commit 3c32297e07
2 changed files with 15 additions and 2 deletions

View File

@ -43,3 +43,4 @@ _XROOTPMAP_ID
WM_STATE
_NET_WM_WINDOW_OPACITY
_NET_SYSTEM_TRAY_ORIENTATION
WM_CHANGE_STATE

16
event.c
View File

@ -515,7 +515,7 @@ event_handle_propertynotify(void *data __attribute__ ((unused)),
if(ev->state == XCB_PROPERTY_DELETE)
return 0; /* ignore */
if((emwin = xembed_getbywin(globalconf.embedded, ev->window)))
else if((emwin = xembed_getbywin(globalconf.embedded, ev->window)))
xembed_property_update(connection, emwin);
else if((c = client_getbywin(ev->window)))
{
@ -617,7 +617,19 @@ event_handle_clientmessage(void *data __attribute__ ((unused)),
xcb_connection_t *connection,
xcb_client_message_event_t *ev)
{
if(ev->type == _XEMBED)
client_t *c;
if(ev->type == WM_CHANGE_STATE)
{
if((c = client_getbywin(ev->window))
&& ev->format == 32
&& ev->data.data32[0] == XCB_WM_ICONIC_STATE)
{
c->ishidden = true;
globalconf.screens[c->screen].need_arrange = true;
}
}
else if(ev->type == _XEMBED)
return xembed_process_client_message(ev);
else if(ev->type == _NET_SYSTEM_TRAY_OPCODE)
return systray_process_client_message(ev);