event: handle iconify request
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
7419a99827
commit
3c32297e07
|
@ -43,3 +43,4 @@ _XROOTPMAP_ID
|
|||
WM_STATE
|
||||
_NET_WM_WINDOW_OPACITY
|
||||
_NET_SYSTEM_TRAY_ORIENTATION
|
||||
WM_CHANGE_STATE
|
||||
|
|
16
event.c
16
event.c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue