From 197ee0ad4732c8668fe38a6b49e0a747866ef3ea Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 16 Apr 2010 22:23:37 -0400 Subject: event_curtime is replaced (publicly) by event_time() This function never returns CurrentTime, which is nice, cuz using CurrentTime for XSetFocus always sucks. If the current XEvent did not have a timestamp, then event_time() will find one. It finds the first timestamp available in the X event queue, meaning the earliest timestamp >= the current (nontimestamped) event. All future events should have a timestamp >= event_time(), so using this in XSetFocus() should not mess up any future calls we make to it. This change seems to work well, as it appears to fix bug #3648. --- openbox/screen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openbox/screen.c') diff --git a/openbox/screen.c b/openbox/screen.c index e939b01d..2ff950ab 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -116,7 +116,7 @@ static gboolean replace_wm(void) current_wm_sn_owner = None; } - timestamp = event_get_server_time(); + timestamp = event_time(); XSetSelectionOwner(obt_display, wm_sn_atom, screen_support_win, timestamp); @@ -731,8 +731,8 @@ void screen_set_desktop(guint num, gboolean dofocus) event_end_ignore_all_enters(ignore_start); - if (event_curtime != CurrentTime) - screen_desktop_user_time = event_curtime; + if (event_source_time() != CurrentTime) + screen_desktop_user_time = event_source_time(); } void screen_add_desktop(gboolean current) -- cgit v1.2.3