X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=327e3a8dd563f2ee8472180929e47712d690df82;hb=2fc662aa62bc12de38b49bb9e687092318873002;hp=0c2b4c394984b107dcf6213f2274f80ac89f6d66;hpb=059fa15ae1ae564607e1d4b01559487dcf25b13a;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 0c2b4c39..327e3a8d 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -24,6 +24,7 @@ static void event_handle_root(XEvent *e); static void event_handle_client(Client *c, XEvent *e); Time event_lasttime = 0; +Time event_unfocustime = 0; /*! The value of the mask for the NumLock modifier */ unsigned int NumLockMask; @@ -250,6 +251,9 @@ void event_process(XEvent *e) caused, like when lowering a window */ if (e->xcrossing.mode == NotifyGrab) return; break; + default: + event_lasttime = CurrentTime; + break; } client = g_hash_table_lookup(client_map, &window); @@ -297,7 +301,7 @@ static void event_handle_root(XEvent *e) msgtype = e->xclient.message_type; if (msgtype == prop_atoms.net_current_desktop) { unsigned int d = e->xclient.data.l[0]; - if (d <= screen_num_desktops) + if (d < screen_num_desktops) screen_set_desktop(d); } else if (msgtype == prop_atoms.net_number_of_desktops) { unsigned int d = e->xclient.data.l[0]; @@ -412,11 +416,9 @@ static void event_handle_client(Client *client, XEvent *e) client->ignore_unmaps--; break; } - g_message("UnmapNotify for %lx", client->window); client_unmanage(client); break; case DestroyNotify: - g_message("DestroyNotify for %lx", client->window); client_unmanage(client); break; case ReparentNotify: @@ -484,7 +486,8 @@ static void event_handle_client(Client *client, XEvent *e) } e->xclient = ce.xclient; } - if ((unsigned)e->xclient.data.l[0] < screen_num_desktops) + if ((unsigned)e->xclient.data.l[0] < screen_num_desktops || + (unsigned)e->xclient.data.l[0] == DESKTOP_ALL) client_set_desktop(client, (unsigned)e->xclient.data.l[0]); } else if (msgtype == prop_atoms.net_wm_state) { /* can't compress these */