Commit graph

119 commits

Author SHA1 Message Date
Joshua Ashton
7b51f5964d wlserver: Crappy workaround for rare filter_global crash... 2022-09-15 01:59:02 +00:00
Joshua Ashton
215a19b0e8 wlserver: Expose base wl_output to non-xwayland server clients 2022-09-15 01:53:51 +01:00
Simon Ser
26bbb53de7 wlserver: create one wl_output global per Xwayland server
Closes: https://github.com/Plagman/gamescope/issues/571
2022-09-10 00:06:44 +00:00
Simon Ser
697818a228 wlserver: start all Xwayland processes in parallel
The next commit will need to inspect wlserver.wlr.xwayland_servers
to figure out which wl_output global to expose.
2022-09-10 00:06:44 +00:00
Joshua Ashton
5ec3b7cffb drm, steamcompmgr: Add GAMESCOPE_DISPLAY_MODE_NUDGE 2022-09-07 11:36:44 +00:00
Joshua Ashton
55f764fa7f wlserver: Add wlserver_surface_is_async 2022-09-06 17:01:22 +01:00
Joshua Ashton
2e62575518 wlserver: Grab presentation hints 2022-09-06 17:01:22 +01:00
Joshua Ashton
6dde7bd8bc wlserver: Add wlserver_wl_surface_info
A stop gap before x11_surface_info which is held by steamcompmgr
2022-09-06 17:01:22 +01:00
Joshua Ashton
dad0939bed wlserver: Rename wlserver_surface to wlserver_x11_surface_info 2022-09-06 17:01:22 +01:00
Joshua Ashton
733f2e2a17 wlserver: Make wlr_surface's data point to wlserver_surface
This used to point directly to gamescope_xwayland_server_t, but we can amke it pooint to wlserver_surface and get it from it's structure.
This lets us add more data.
2022-09-06 17:01:22 +01:00
Joshua Ashton
6da2f90e51 Revert "wlserver: create one wl_output global per Xwayland server"
This reverts commit 5b7f70a9e5.
2022-08-23 20:40:10 +00:00
Simon Ser
608de1c19e Remove unused wlserver_movecursor() 2022-08-21 13:12:05 +02:00
Simon Ser
5b7f70a9e5 wlserver: create one wl_output global per Xwayland server
Closes: https://github.com/Plagman/gamescope/issues/571
2022-08-21 13:08:57 +02:00
Joshua Ashton
518c5042fd wlserver: Put accum mouse dx/dy on wlserver
Given we move that, store it there. Doesn't really matter though.
2022-08-19 21:28:38 +00:00
Joshua Ashton
bf3093bc2c wlserver: Fix relative mouse movements
Do the same thing as SDL2
2022-08-19 21:18:18 +00:00
Simon Ser
cce6a29a24 wlserver: ignore commit if buffer didn't change 2022-07-25 17:09:48 +02:00
Joshua Ashton
7167877bca wlserver: Fix creating headless backend when nested
Otherwise we don't have it and it segfaults.

Closes: #553
2022-07-15 23:46:59 +00:00
Joshua Ashton
71717b2ce3 wlserver: Fix pending surfaces getting xwayland server set
Fixes Warhammer 40,000: Dawn of War II (15620)
2022-07-15 10:45:08 +02:00
Joshua Ashton
8b99305352 wlserver: Fix type of wl_id, x11_id
These are uint32_t
2022-07-15 10:45:08 +02:00
Simon Ser
fde74ee8d0 Update wl_output info after hotplug 2022-07-14 16:20:14 -07:00
Clément Guérin
1b3ad77181 handle SDL touch events
disable SDL mouse emulation to avoid getting mouse events.
2022-06-20 08:59:18 +02:00
Joshua Ashton
2855219311 wlserver: Add WLSERVER_TOUCH_CLICK_DISABLED 2022-05-03 23:55:08 +00:00
Joshua Ashton
34c6904234 wlserver: Be more defensive in content_override_handle_surface_destroy
Better to be defensive here than crashing.
2022-03-25 23:13:05 +00:00
Joshua Ashton
291d788b4f steamcompmgr: Show cursor on tap always 2022-02-10 02:19:08 +00:00
Joshua Ashton
5ed0753165 wlserver: Add wlserver_set_xwayland_server_mode
Sets the current mode and stuff for a specific xwayland server.
2022-02-09 00:17:15 +00:00
Joshua Ashton
b4cf9d3203 wlserver: Use root server for content overrides 2022-02-04 00:49:26 +00:00
Joshua Ashton
779d8f1bee wlserver: Handle tapping overrides off screen
This clamp was stopping us from clicking off the current surface, which we want now.
2022-01-31 23:45:45 +00:00
Joshua Ashton
3dc36c8799 wlserver: Redirect volume events to root xwayland
Avoids games being the ones to recieve our lower volume/raise volume keys -- Steam should handle these.
2022-01-31 20:39:35 +00:00
Joshua Ashton
57eee35f29 wlserver: Wait for steamcompmgr to shutdown before cleaning up xwayland
Makes shutdown cleaner
2022-01-20 08:55:26 +00:00
Joshua Ashton
d781082888 wlserver: Make content overrides per xwayland server 2022-01-20 07:11:40 +00:00
Joshua Ashton
205cfbdf87 wlserver: Add a mode for multiple xwaylands
Adds --xwayland-count to control the number of xwaylands.
2022-01-20 07:11:40 +00:00
Joshua Ashton
ca8fd6552a wlserver: Move commit queues to per-xwayland server, rather than global 2022-01-20 07:11:40 +00:00
Joshua Ashton
1536604533 wlserver: Handle mousemotion only for focused server 2022-01-20 07:11:40 +00:00
Joshua Ashton
43d9cf4e6a steamcompmgr: Initial support for multiple xwaylands
Doesn't handle focus or painting anything other than the root context yet.
2022-01-20 07:11:40 +00:00
Joshua Ashton
deb0364c05 wlserver: Move xdisplay init and ownership to xwayland_server
Allows us to bring back the sdlwindow mouse behaviour
2022-01-20 07:11:40 +00:00
Joshua Ashton
26f9942e6c wlserver: Split out xwayland_server from global wlserver state 2022-01-20 07:11:40 +00:00
Simon Ser
c1958be1d9 Drop leftover noop.h include 2021-12-20 14:09:39 +01:00
Simon Ser
11f89c1b15 Upgrade wlroots to 0.15.0 2021-12-20 10:22:17 +01:00
Simon Ser
b3b8d60c00 Disable Xwayland touch pointer emulation
Depends on https://github.com/swaywm/wlroots/pull/3289
2021-11-02 12:21:12 +01:00
Pierre-Loup A. Griffais
26aeebf11d steamcompmgr: publish input change count 2021-10-17 20:17:30 -07:00
Simon Ser
ad26899b20 ime: reset keymap after sending emulated key events
This fixes SteamOS' virtual keyboard.
2021-10-08 22:55:01 -07:00
Simon Ser
49da53db55 Implement a subset of input-method-unstable-v2
This allows a Wayland client to send arbitrary UTF-8 text to the
currently focused X11 client. Useful for virtual keyboards.

We generate a keymap on-the-fly suitable for the text to type.
2021-10-08 22:55:01 -07:00
Pierre-Loup A. Griffais
39c9e93e0c Make default touch mode configurable. 2021-10-04 15:00:29 -07:00
Jan Beich
12bff15700 wlserver: hide remaining pipewire stuff with -Dpipewire=disabled
src/wlserver.cpp:511:13: warning: unused function 'create_gamescope_pipewire' [-Wunused-function]
static void create_gamescope_pipewire( void )
            ^
2021-09-15 18:42:12 +02:00
Jan Beich
5548b29521 wlserver: compare using larger type on 32-bit architectures
src/wlserver.cpp:430:16: warning: comparison of integers of different signs: 'long' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
                if (s->wl_id == id && s->wlr == nullptr)
                    ~~~~~~~~ ^  ~~
2021-09-15 18:42:12 +02:00
Simon Ser
27cff4e41b wlserver: drop headless backend
Saves us the GLES2 renderer init.
2021-09-15 13:35:42 +02:00
Simon Ser
a480fe81fe Drop VulkanRenderer_t.parent
We don't need the wlroots parent GLES2 renderer anymore.
2021-09-15 13:35:42 +02:00
Simon Ser
92c6823897 wlserver: let wlr_renderer init the DMA-BUF Wayland protocols
wlr_renderer_init_wl_display will automatically init the suitable
Wayland protocols.
2021-09-15 13:35:42 +02:00
Simon Ser
ae7fcc5ba7 wlserver: get wlr_buffer from VulkanWlrTexture_t
This side-steps wlr_client_buffer and ensures we get access to the
underlying buffer. This allows us to call
wlr_buffer_begin_data_ptr_access to upload shm textures.
2021-09-15 13:35:42 +02:00
Simon Ser
db1ffbe2e4 rendervulkan: remove wlr_renderer_impl.init_wl_display
We don't need EGL_bind_wayland_display anymore.
2021-09-15 13:35:42 +02:00