[metacity] window: treat CurrentTime as legal timestamp in activation
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] window: treat CurrentTime as legal timestamp in activation
- Date: Sun, 20 Oct 2019 14:40:15 +0000 (UTC)
commit d0caba28c85ef9a08aa11322f435489acd550cf0
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Oct 20 17:39:23 2019 +0300
window: treat CurrentTime as legal timestamp in activation
Based on mutter commit:
https://gitlab.gnome.org/GNOME/mutter/commit/5defe574d74eace55bfe9e
src/core/window.c | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 08fd7996..97fa842c 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3154,23 +3154,13 @@ window_activate (MetaWindow *window,
MetaClientType source_indication,
MetaWorkspace *workspace)
{
- gboolean can_ignore_outdated_timestamps;
meta_topic (META_DEBUG_FOCUS,
"_NET_ACTIVE_WINDOW message sent for %s at time %u "
"by client type %u.\n",
window->desc, timestamp, source_indication);
- /* Older EWMH spec didn't specify a timestamp; we decide to honor these only
- * if the app specifies that it is a pager.
- *
- * Update: Unconditionally honor 0 timestamps for now; we'll fight
- * that battle later. Just remove the "FALSE &&" in order to only
- * honor 0 timestamps for pagers.
- */
- can_ignore_outdated_timestamps =
- (timestamp != 0 || (FALSE && source_indication != META_CLIENT_TYPE_PAGER));
- if (XSERVER_TIME_IS_BEFORE (timestamp, window->display->last_user_time) &&
- can_ignore_outdated_timestamps)
+ if (timestamp != 0 &&
+ XSERVER_TIME_IS_BEFORE (timestamp, window->display->last_user_time))
{
meta_topic (META_DEBUG_FOCUS,
"last_user_time (%u) is more recent; ignoring "
@@ -3180,13 +3170,8 @@ window_activate (MetaWindow *window,
return;
}
- /* For those stupid pagers, get a valid timestamp and show a warning */
if (timestamp == 0)
- {
- g_warning ("meta_window_activate called by a pager with a 0 timestamp; "
- "the pager needs to be fixed.");
- timestamp = meta_display_get_current_time_roundtrip (window->display);
- }
+ timestamp = meta_display_get_current_time_roundtrip (window->display);
meta_window_set_user_time (window, timestamp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]