When a group indicator (or a latched indicator of any kind) is defined,
e.g.:
indicator "Scroll Lock" { groups = Group2; }
the logical and physical indicator state may desync across multiple
connected keyboards.
This is caused by XkbPushLockedStateToSlaves only pushing locked_mods to
the slave devices. Pushing locked_group (as well as latched groups/mods)
along with locked_mods resolves the issue.
The issue is not observed with API calls because a different code path
is taken (avoiding XkbPushLockedStateToSlaves altogether).
Signed-off-by: Alexander Melnyk <inboxnumberzero@zoho.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2120>
In Wayland, mouse coordinates are not updated after all x11 clients have left,
causing the mouse information to remain at the position left by the last x11
client. However, if CheckMotion is called at this point for other reasons
(such as window mapped, reactive, etc.), xwayland might continue to send enter
events to x11 clients, even if the mouse is actually on a Wayland client.
This MR introduces and checks pointer_enter_count to determine if the mouse
has left an x11 client and is now on a Wayland client. When it's confirmed
that the mouse is no longer on an x11 client but on a Wayland client,
returning TRUE in sprite_check_lost_focus causes XYToWindow to return to the
root window, preventing further enter events from being sent to x11 clients.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2112>
Make sure the code change does not contain tab characters nor stray
newlines.
This is contributed by Peter Hutterer, adapted from the libinput similar
CI check.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2121>
When running rootful, i.e. as a regular Wayland client, Xwayland needs
to wait for the initial configure event before posting its initial
buffer and commit the surface.
Not doing so may cause mutter to log a warning when Xwayland is started
rootful:
| Buggy client (org.freedesktop.Xwayland) committed initial non-empty
| content without acknowledging configuration, working around.
Or running rootful with libdecor:
| Client provided invalid window geometry for xdg_surface#nn
| (org.freedesktop.Xwayland - Wnn (Xwayland on :nn)). Working around.
|
| Buggy client (org.freedesktop.Xwayland) committed initial non-empty
| content without acknowledging configuration, working around.
This is actually mutter being nice, as this should be treated as a
protocol error and Xwayland would be terminated.
To avoid the issue, we need to hold on attaching a buffer and committing
the surface until we actually get the first configure event from the
compositor.
That, however, only applies to rootful mode, so we can leave the default
code path for rootless untouched.
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1853
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
v2: commit the surface after attaching the first buffer on configure
event only for the initial configure (Michel Dänzer).
v3: return early in present flip if we didn't get the initial configure
event (Michel Dänzer).
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2110>
Up to the native mode, as reported by the wl_output protocol.
This ensures that fullscreen apps can always use the native mode.
Also ensure the root window is large enough for the output at its
current position with the native mode.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2095>
In the rootless case, Xwayland receives pointer motion events only while
the pointer is over one of its Wayland surfaces, so there's no need for
constraining them to RandR boundaries.
This also avoids them getting spuriously constrained when using RandR
emulation for modes larger than the default one.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2095>
Always add it as the first mode, which makes it considered the preferred
mode per the RandR protocol.
Mark the logical mode as currently set.
v2:
* Drop change in xwl_window_should_enable_viewport which seems
unnecessary and coult result in a crash. (Olivier Fourdan)
* Use 'native' instead of 'actual'.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2095>