summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-26 07:07:55 +0000
committerDana Jansens <danakj@orodu.net>2003-03-26 07:07:55 +0000
commit059fa15ae1ae564607e1d4b01559487dcf25b13a (patch)
tree939fe59b1e965ae81db8b29a88a1298123315430
parent135f1c61e28cca91fcd02ccb26d6329a52c36ec1 (diff)
use ungrab enter events
-rw-r--r--openbox/event.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/openbox/event.c b/openbox/event.c
index 69b63ff1..0c2b4c39 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -246,10 +246,9 @@ 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;
}
@@ -485,9 +484,8 @@ static void event_handle_client(Client *client, XEvent *e)
}
e->xclient = ce.xclient;
}
- if (e->xclient.data.l[0] >= 0 &&
- e->xclient.data.l[0] < screen_num_desktops)
- 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",