X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;fp=openbox%2Fevent.c;h=44b6eb706c48d544289e6e4772dffdb09785379c;hb=e6fea245756b59f83dc0f51d13feee9cf093a1a1;hp=aca69cc36aab7380ea9dcee15611f6e63e8c12d3;hpb=7b57ef12963a298c731d0ef4a67de9c985ac9ba4;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index aca69cc3..44b6eb70 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -2021,7 +2021,7 @@ void event_cancel_all_key_grabs(void) XSync(obt_display, FALSE); } -gboolean event_time_after(Time t1, Time t2) +gboolean event_time_after(guint32 t1, guint32 t2) { g_assert(t1 != CurrentTime); g_assert(t2 != CurrentTime); @@ -2034,8 +2034,10 @@ gboolean event_time_after(Time t1, Time t2) - http://tronche.com/gui/x/xlib/input/pointer-grabbing.html */ - /* TIME_HALF is half of the number space of a Time type variable */ -#define TIME_HALF (Time)(1 << (sizeof(Time)*8-1)) + /* TIME_HALF is not half of the number space of a Time type variable. + * Rather, it is half the number space of a timestamp value, which is + * always 32 bits. */ +#define TIME_HALF (guint32)(1 << 31) if (t2 >= TIME_HALF) /* t2 is in the second half so t1 might wrap around and be smaller than