mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 13:24:09 +00:00
x11: 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. This is submitted for MR https://gitlab.gnome.org/GNOME/mutter/merge_requests/671.
This commit is contained in:
parent
92f210039e
commit
e9cc220c8e
@ -1580,19 +1580,18 @@ handle_other_xevent (MetaX11Display *x11_display,
|
||||
|
||||
workspace = meta_workspace_manager_get_workspace_by_index (workspace_manager, space);
|
||||
|
||||
/* Handle clients using the older version of the spec... */
|
||||
if (time == 0 && workspace)
|
||||
{
|
||||
meta_warning ("Received a NET_CURRENT_DESKTOP message "
|
||||
"from a broken (outdated) client who sent "
|
||||
"a 0 timestamp\n");
|
||||
time = meta_x11_display_get_current_time_roundtrip (x11_display);
|
||||
}
|
||||
|
||||
if (workspace)
|
||||
meta_workspace_activate (workspace, time);
|
||||
{
|
||||
/* Handle clients using the older version of the spec... */
|
||||
if (time == 0)
|
||||
time = meta_x11_display_get_current_time_roundtrip (x11_display);
|
||||
|
||||
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 ==
|
||||
x11_display->atom__NET_NUMBER_OF_DESKTOPS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user