Commit graph

131 commits

Author SHA1 Message Date
ruineka
cf89b2fbae
drm: add support for the panel orientation property 2022-10-11 18:20:14 +02:00
ruineka
647e1d96d0
Add --force-orientation option
Co-authored-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Co-authored-by: alphonsez1 <alphonsez743@gmail.com>
Co-authored-by: Ruineka <ruineka@pop-os.localdomain>
2022-10-07 15:29:52 +02:00
Simon Ser
79ad108c41 wlserver: fix output global not exposed
Fixes: 7c0f65e62d ("wlserver: stop re-creating wl_output global")
2022-10-01 19:11:52 +02:00
Simon Ser
7c0f65e62d wlserver: stop re-creating wl_output global 2022-09-27 19:03:00 +01:00
Simon Ser
576041c2b3 wlserver: remove trailing whitespace 2022-09-27 19:38:29 +02:00
Joshua Ashton
554a4af14d wlserver: Only update first xwayland server wlserver_set_output_info
Only [0] should get updated with any of this info.
Games do NOT need to see hotplug because they just crash... The Xrandr interface for crtc stuff is VERY broken with MST and our reconnect spam here.
2022-09-21 23:01:48 +00:00
Joshua Ashton
8608e017ec wlserver: Handle wl commits before X11 surface has come up
The inverse case of the pending surfaces...
2022-09-19 09:51:57 +01:00
Joshua Ashton
4f62e5d18b wlserver: Avoid use after free of wlr surface data when wlserver_wl_surface_info is destroyed 2022-09-16 01:08:28 +00:00
Joshua Ashton
4754b17824 wlserver: Fix stale wlr pointer in x11_surface_info + fix mouse focus surface destruction
Stale pointers aaaa
2022-09-16 00:44:22 +01:00
Joshua Ashton
716552b7d6 wlserver: Fix crash in content_override_handle_surface_destroy
The x11 surface owned by the window can be destroyed, causing us to access a stale ptr.

Assume server 0 to delete the content override, because thats the only one it can be created on.

We should rev the protocol at some point with support for specifying the DISPLAY... ughghghghghghgh
2022-09-16 00:44:22 +01:00
Joshua Ashton
c8057afbc4 wlserver: Clear out x11_surface ptr when destroyed 2022-09-16 00:44:22 +01:00
Simon Ser
6237c3452b wlserver: explain why filter_global may need to handle NULL wlr_output
1. output plugged in, gamescope creates new wlr_output and sends a
   wl_registry.global event
2. client sees it, sends a wl_registry.bind request
3. output plugged out, gamescope sends a wl_registry.global_remove
   event and destroys the wlr_output
4. gamescope receives the wl_registry.bind request, but the wlr_output
   no longer exists
5. client receives the wl_registry.global_remove event
2022-09-15 08:05:41 +01:00
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