Commit graph

19721 commits

Author SHA1 Message Date
kohnish
02ea810b80 Revert "dix: unexport global variables"
This reverts commit 040e41c7e9.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
1c9b55a1e5 Revert "os: unexport ddx callbacks"
This reverts commit e5c8b664d3.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
f613d5306e Revert "dix: unexport fields from opaque.h not used by modules/drivers"
This reverts commit 06b599edb6.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
7679bc0c82 Revert "mi: make miRecolorCursor() static"
This reverts commit 6dbb957922.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
5e309f8815 Revert "mi: make CopyGetMasterEvent() static"
This reverts commit 12c507cd1f.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
ca14f9da2b Revert "mi: unexport miWideArc()"
This reverts commit aaaa0a35e5.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
38c9988683 Revert "mi: unexport miStepDash()"
This reverts commit 8a6bbc80f3.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
7e3166b2cb Revert "mi: unexport mieqInit()"
This reverts commit 5ac361cce9.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
33bce8b4ae Revert "mi: unexport mieqFini()"
This reverts commit 4742790351.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
abbddbfdfb Revert "mi: unexport mieqEnqueue()"
This reverts commit 9dd280607f.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
e1f43d2888 Revert "mi: unexport mieqSwitchScreen()"
This reverts commit 413e6ed2c8.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
4779026cc0 Revert "mi: unexport mieqProcessDeviceEvent()"
This reverts commit 0f7770bce3.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
a030c71a43 Revert "mi: unexport mieqProcessInputEvents()"
This reverts commit 9aa23b6abd.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
3014873fd7 Revert "mi: unexport mieqAddCallbackOnDrained()"
This reverts commit 269d54c48f.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
edce33fa26 Revert "mi: unexport mieqRemoveCallbackOnDrained()"
This reverts commit 964127ce10.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
b44a8d6451 Revert "mi: unexport mieqSetHandler()"
This reverts commit 7748984e3a.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
a085d2dba5 Revert "mi: unexport miSendExposures()"
This reverts commit 8d07450904.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
623286fc3e Revert "mi: unexport miWindowExposures()"
This reverts commit e424f49cdb.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
fc6a3af75c Revert "mi: unexport miPaintWindow()"
This reverts commit a54e8f5343.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
0d6dce5af3 Revert "mi: unexport miSourceValidate()"
This reverts commit 191cca0905.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
567ffcad2d Revert "mi: unexport miShapedWindowIn()"
This reverts commit c2ee74c523.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
7281fb5aa6 Revert "mi: unexport miValidateTree()"
This reverts commit 7e21a514d7.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
735d7e040f Revert "mi: unexport miClearToBackground()"
This reverts commit 3856b6cb5e.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
46fa02349a Revert "mi: unexport miMarkWindow()"
This reverts commit bcbb6eec62.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
193cc84905 Revert "mi: unexport miMarkOverlappedWindows()"
This reverts commit ade6650a81.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
e8c26ca1a1 Revert "mi: unexport miHandleValidateExposures()"
This reverts commit 0624a8bad4.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
768da80f83 Revert "mi: unexport miMoveWindow()"
This reverts commit faad8ed1c6.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
da62445541 Revert "mi: unexport miResizeWindow()"
This reverts commit 14565a4561.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
145bce2f6a Revert "mi: unexport miGetLayerWindow()"
This reverts commit f11e203215.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
7a90427676 Revert "mi: unexport miSetShape()"
This reverts commit 597ba690d3.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
0fa834fa98 Revert "mi: unexport miChangeBorderWidth()"
This reverts commit b23ecec2f4.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
771c3f534f Revert "mi: unexport miMarkUnrealizedWindow()"
This reverts commit 6c3b432053.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
1a8877057d Revert "mi: unexport miSpriteTrace()"
This reverts commit 85be6c82b0.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
ba5633f95e Revert "mi: unexport miXYToWindow()"
This reverts commit 3cf2408232.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
kohnish
9b14b47ff3 Revert "mi: unexport SetInstalledmiColormap() macro"
This reverts commit aae9bd3f62.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2102>
2026-02-08 11:57:52 -08:00
Yixue Wang
6bf6a9bff2 xwayland: wrong expecting_event
According to

https://wayland.app/protocols/wayland#wl_seat:event:capabilities

Compositor might send capabilities when its capabilities change.
Decrease expecting_event here without any check might cause a
negative expecting_count.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2123>
2026-01-28 16:28:59 +08:00
Alexander Melnyk
36a7fdd315 xkb: Fix locked/latched indicator desync across multiple keyboards
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>
2026-01-28 03:31:19 +02:00
Liu Heng
e673a4bda0 xwayland: prevent X11 get enter event when pointer is over Wayland client
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>
2026-01-20 10:02:36 +08:00
Olivier Fourdan
9c31b4ad8f xwayland/ci: Enforce various code style checks
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>
2026-01-15 14:40:45 +01:00
Olivier Fourdan
5a78e5f1e9 xwayland: Clean-up stray newlines
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2121>
2026-01-15 14:34:27 +01:00
Olivier Fourdan
904cdb0d11 xwayland: Expand tab characters
Over time, some sneaky tab characters have found their way in the
Xwayland code, even though they were not allowed:

  https://www.x.org/wiki/CodingStyle/

Simply expand the tabs to get rid of these...

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2121>
2026-01-15 14:34:27 +01:00
Olivier Fourdan
37f59e1a4d xwayland: Avoid premature surface commit running rootfull
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>
2026-01-12 10:00:02 +01:00
Michel Dänzer
44dea3a8bd xwayland: Adjust RandR emulation for rotation
Need to use the extents of the output in screen cordinates, instead of
the canonical mode size.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2095>
2026-01-06 16:23:20 +00:00
Michel Dänzer
d339284006 xwayland: Add emulated modes larger than the logical mode
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>
2026-01-06 16:23:20 +00:00
Michel Dänzer
dcfba8a9bd xwayland: Clear ConstrainCursorHarder in xwl_screen_init_output
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>
2026-01-06 16:23:20 +00:00
Michel Dänzer
288dcb3128 xwayland: Add RandR mode for the native resolution if it fits in logical
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>
2026-01-06 16:23:17 +00:00
Michel Dänzer
4ea088f9e2 xwayland: Do not assume the first RandR mode is the logical mode
It currently always is, it won't be with the next commit though.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2095>
2026-01-06 16:23:16 +00:00
Michel Dänzer
e4da0673f7 xwayland: Set output mode size as reported by the wl_output protocol
This means xwl_output->mode_width/height can be non-0 also with
rootless, so need to check for rootful explicitly in
xwl_output_find_mode.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2095>
2026-01-06 16:23:16 +00:00
Michel Dänzer
a1be2542e0 xwayland: Refactor output_get_logical_mode/extents helpers
Preparation for later changes.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2095>
2026-01-06 16:23:15 +00:00
Michel Dänzer
ce67045211 xwayland: Use logical_ prefix for logical coordinate system values
Inspired by
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/878 .

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2095>
2026-01-06 16:23:15 +00:00