[metacity] display: remove benign warning for older X clients
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] display: remove benign warning for older X clients
- Date: Wed, 21 Aug 2019 11:58:42 +0000 (UTC)
commit 4c8927e5c11a9bc7aed40b18dda6961be64e36cc
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Aug 18 16:11:56 2019 +0300
display: remove benign warning for older X clients
The default configuration of libinput-gestures utility invokes wmctrl to
switch between desktops. It uses wmctrl because this works on both Xorg
and Wayland (via XWayland). Unfortunately, this generates the following
warning message every time, in both Xorg and Wayland desktops:
"Received a NET_CURRENT_DESKTOP message from a broken (outdated) client
who sent a 0 timestamp"
The desktop switch still works fine. The tiny code change here removes
this specific warning because, as the prefacing code comment originally
said and still says, older clients can validly pass a 0 time value so
why complain about that?
I also refactored the "if (workspace)" code slightly to avoid the double
test of the workspace value.
Based on mutter commit:
https://gitlab.gnome.org/GNOME/mutter/commit/e9cc220c8e0fd6843d2e77
src/core/display.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 57029807..ce3b6904 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -2440,19 +2440,18 @@ event_callback (XEvent *event,
workspace = meta_screen_get_workspace_by_index (screen, space);
- /* Handle clients using the older version of the spec... */
- if (time == 0 && workspace)
+ if (workspace)
{
- g_warning ("Received a NET_CURRENT_DESKTOP message from "
- "a broken (outdated) client who sent a 0 timestamp");
+ /* Handle clients using the older version of the spec... */
+ if (time == 0)
+ time = meta_display_get_current_time_roundtrip (display);
- time = meta_display_get_current_time_roundtrip (display);
+ meta_workspace_activate (workspace, time);
}
-
- if (workspace)
- meta_workspace_activate (workspace, time);
else
- meta_verbose ("Don't know about workspace %d\n", space);
+ {
+ meta_verbose ("Don't know about workspace %d\n", space);
+ }
}
else if (event->xclient.message_type ==
display->atom__NET_NUMBER_OF_DESKTOPS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]