Esempio n. 1
0
static void
event_handle_reparentnotify(xcb_reparent_notify_event_t *ev)
{
    client_t *c;

    if((c = client_getbywin(ev->window)) && c->frame_window != ev->parent)
    {
        /* Ignore reparents to the root window, they *might* be caused by
         * ourselves if a client quickly unmaps and maps itself again. */
        if (ev->parent != globalconf.screen->root)
            client_unmanage(c, true);
    }
}
Esempio n. 2
0
/** The destroy notify event handler.
 * \param ev The event.
 */
static void
event_handle_destroynotify(xcb_destroy_notify_event_t *ev)
{
    client_t *c;

    if((c = client_getbywin(ev->window)))
        client_unmanage(c, false);
    else
        for(int i = 0; i < globalconf.embedded.len; i++)
            if(globalconf.embedded.tab[i].win == ev->window)
            {
                xembed_window_array_take(&globalconf.embedded, i);
                luaA_systray_invalidate();
            }
}
Esempio n. 3
0
/** The unmap notify event handler.
 * \param ev The event.
 */
static void
event_handle_unmapnotify(xcb_unmap_notify_event_t *ev)
{
    client_t *c;

    if((c = client_getbywin(ev->window)))
        client_unmanage(c, true);
    else
        for(int i = 0; i < globalconf.embedded.len; i++)
            if(globalconf.embedded.tab[i].win == ev->window)
            {
                xembed_window_array_take(&globalconf.embedded, i);
                xcb_change_save_set(globalconf.connection, XCB_SET_MODE_DELETE, ev->window);
                luaA_systray_invalidate();
            }
}
Esempio n. 4
0
File: event.c Progetto: n4cht/kwm
/** DestroyNotify handle event
 * \param ev XDestroyWindowEvent pointer
*/
static void
destroynotify(XDestroyWindowEvent *ev)
{
     Client *c;
     Systray *s;

     if((c = client_gb_win(ev->window)))
     {
          client_unmanage(c);
          XSetErrorHandler(errorhandler);
     }
     else if((s = systray_find(ev->window)))
     {
          setwinstate(s->win, WithdrawnState);
          systray_del(s);
          systray_update();
     }

     return;
}
Esempio n. 5
0
File: event.c Progetto: n4cht/kwm
/** UnmapNotify handle event
 * \param ev XUnmapEvent pointer
 */
static void
unmapnotify(XUnmapEvent *ev)
{
     Client *c;
     Systray *s;

     if((c = client_gb_win(ev->window))
        && ev->send_event
        && !(c->flags & HideFlag))
     {
          client_unmanage(c);
          XSetErrorHandler(errorhandler);
     }

     if((s = systray_find(ev->window)))
     {
          systray_del(s);
          systray_update();
     }

     return;
}