X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=0c2b4c394984b107dcf6213f2274f80ac89f6d66;hb=b48c0e0b47b649af5b93619af8021420264b19d6;hp=4be03d9445d71668f4040175a5a39212a309b0dc;hpb=436c85576e99f4df81273f8b510a94605e676cab;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 4be03d94..0c2b4c39 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -246,14 +246,13 @@ void event_process(XEvent *e) case EnterNotify: case LeaveNotify: event_lasttime = e->xcrossing.time; - /* XXX this caused problems before... but i don't remember why. hah. - so back it is. if problems arise again, then try filtering on the - detail instead of the mode. */ - if (e->xcrossing.mode != NotifyNormal) return; + /* NotifyUngrab occurs when a mouse button is released and the event is + caused, like when lowering a window */ + if (e->xcrossing.mode == NotifyGrab) return; break; } - client = g_hash_table_lookup(client_map, (gpointer)window); + client = g_hash_table_lookup(client_map, &window); /* deal with it in the kernel */ if (client) @@ -438,6 +437,8 @@ static void event_handle_client(Client *client, XEvent *e) client_unmanage(client); break; case MapRequest: + if (!client->iconic) break; /* this normally doesn't happen, but if it + does, we don't want it! */ if (screen_showing_desktop) screen_show_desktop(FALSE); client_iconify(client, FALSE, TRUE); @@ -483,7 +484,8 @@ static void event_handle_client(Client *client, XEvent *e) } e->xclient = ce.xclient; } - client_set_desktop(client, e->xclient.data.l[0]); + if ((unsigned)e->xclient.data.l[0] < screen_num_desktops) + client_set_desktop(client, (unsigned)e->xclient.data.l[0]); } else if (msgtype == prop_atoms.net_wm_state) { /* can't compress these */ g_message("net_wm_state %s %ld %ld for 0x%lx",