[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 61b6da5ace: Also avoid setting _NET_WM_USER_TIME on crossing
From: |
Po Lu |
Subject: |
master 61b6da5ace: Also avoid setting _NET_WM_USER_TIME on crossing |
Date: |
Tue, 11 Oct 2022 07:56:15 -0400 (EDT) |
branch: master
commit 61b6da5acef2d550022c664e628346539ba1852f
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Also avoid setting _NET_WM_USER_TIME on crossing
* src/xterm.c (handle_one_xevent): Stop setting user time prop
on crossing events.
---
src/xterm.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index 21207a3146..9c34fce7c5 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7592,17 +7592,19 @@ static void x_check_font (struct frame *, struct font
*);
ridiculously large value, and this way a more reasonable timestamp
can be obtained upon the next event.
+ Alternatively, the server time could've overflowed.
+
SET_PROPERTY specifies whether or not to change the user time
property for the active frame. The important thing is to not set
the last user time upon leave events; on Metacity and GNOME Shell,
mapping a new frame on top of the old frame potentially causes
- LeaveNotify or XI_Leave to be sent to the old frame if it contains
- the pointer, as the new frame will initially stack above the old
- frame. If _NET_WM_USER_TIME is changed at that point, then GNOME
- may get notified about the user time change on the old frame before
- it tries to focus the new frame, which will make it consider the
- new frame (whose user time property will not have been updated at
- that point, due to not being focused) as having been mapped
+ crossing events to be sent to the old frame if it contains the
+ pointer, as the new frame will initially stack above the old frame.
+ If _NET_WM_USER_TIME is changed at that point, then GNOME may get
+ notified about the user time change on the old frame before it
+ tries to focus the new frame, which will make it consider the new
+ frame (whose user time property will not have been updated at that
+ point, due to not being focused) as having been mapped
out-of-order, and lower the new frame, which is typically not what
users want. */
@@ -19567,7 +19569,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
case EnterNotify:
x_display_set_last_user_time (dpyinfo, event->xcrossing.time,
- event->xcrossing.send_event, true);
+ event->xcrossing.send_event, false);
#ifdef HAVE_XINPUT2
/* For whatever reason, the X server continues to deliver
@@ -21114,7 +21116,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
ev.send_event = enter->send_event;
x_display_set_last_user_time (dpyinfo, enter->time,
- enter->send_event, true);
+ enter->send_event, false);
#ifdef USE_MOTIF
use_copy = true;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 61b6da5ace: Also avoid setting _NET_WM_USER_TIME on crossing,
Po Lu <=