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
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
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
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
d781082888
wlserver: Make content overrides per xwayland server
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
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
11f89c1b15
Upgrade wlroots to 0.15.0
2021-12-20 10:22:17 +01:00
Simon Ser
a3ec65ef06
Switch to vendored protocol
...
We'll implement some more features on top of input-method, so let's
incubate our own protocol for now. We'll give feedback upstream
once we've experimented a bit with this approach.
The protocol is minimal: it just includes the features needed for
gamescope. It's always easier to add new requests/events than to
change existing ones.
2021-10-08 22:55:01 -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
Simon Ser
27cff4e41b
wlserver: drop headless backend
...
Saves us the GLES2 renderer init.
2021-09-15 13:35:42 +02:00
Simon Ser
1fca3896b1
wlserver: remove wlserver_init args
...
argc and argv are unused, bIsNested can be fetched from globals.
2021-09-14 17:03:52 +02:00
Simon Ser
7198851e98
Unify init functions return types a bit
...
We had both int and bool, let's try to end up with only bools.
2021-09-14 16:59:46 +02:00
Simon Ser
f10e2248fd
wlserver: set keyboard in wlserver_key
...
This ensures clients see the right keymap/modifiers/etc when
handling a keyboard event.
2021-09-14 13:47:55 +02:00
Valentin David
5672737093
wlserver: Add support for mouse wheels
2021-09-13 23:17:34 +02:00
Pierre-Loup A. Griffais
66064b23cf
steamcompmgr: don't always warp cursor on mouse input focus change
2021-09-12 23:39:34 -07:00
Simon Ser
fc748ebd78
wlserver: remove wlserver_run return value
...
It always returns 0.
2021-09-10 11:01:54 +02:00
Simon Ser
5b776be6d2
Move the run global to main.hpp
...
It's used by both wlserver and steamcompmgr.
2021-08-10 12:05:49 +02:00
Simon Ser
24bea3406a
Make the run global atomic
...
It's written to from multiple threads.
2021-08-10 12:02:26 +02:00
Simon Ser
d67ce2865e
wlserver: make global static
...
Let's prevent other threads from directly accessing it. Helper
functions can be introduced as needed.
2021-07-28 16:14:59 +02:00
Simon Ser
c33ad217e1
Handle session switch events
...
Pause/resume our frame submission on VT switch.
Closes: https://github.com/Plagman/gamescope/issues/6
2021-07-27 14:11:00 +02:00
Simon Ser
43ba33425b
Open KMS device with wlr_session
...
This allows proper integration with logind/seatd. When switching
VTs, gamescope now dies with ENOPERM instead of making VT switching
freeze.
References: https://github.com/Plagman/gamescope/issues/6
2021-07-27 11:25:05 +02:00
Simon Ser
ba79953e4e
wlserver: strip wl_ prefix from fields, remove event loop FD
2021-07-27 10:46:03 +02:00
Simon Ser
3e17ea2e6f
Add enum for g_nTouchClickMode
...
Makes it clearer what the values mean.
2021-06-18 10:44:13 +02:00
Simon Ser
33f207d6a1
Replace nudge X11 events with pipe
...
Avoids the roundtrip through the X11 server. Avoids having to connect
to the X11 server from multiple threads.
2021-06-10 14:49:02 +02:00
Pierre-Loup A. Griffais
2bb4907993
Also spew wayland display name through session pipe.
2021-04-27 21:17:36 -07:00
Simon Ser
a05e5b0a39
Implement gamescope-xwayland protocol
2021-04-20 09:13:10 +02:00
Simon Ser
ce0a3f7259
Rename wlserver_surface_set_id to wlserver_surface_set_wl_id
...
Make it clear the ID refers to a Wayland object.
2021-04-20 09:13:10 +02:00
Simon Ser
c834999a5f
Introduce wlserver_surface
2021-04-02 08:37:53 +02:00
Simon Ser
9b780b48db
Use no-op backend for output
...
This avoids needlessly creating buffers for an headless output we won't
use, and will allow us to more easily replace the headless backend with
a custom renderer in the future.
2021-02-01 10:24:39 +01:00
Pierre-Loup A. Griffais
4f70525fc6
wlserver: add touch passthrough support, if clickmode == 0
2020-09-18 14:59:26 -07:00
Simon Ser
bae255ee1a
Get rid of C_SIDE
...
wlroots headers can mostly be included with extern "C" blocks. Two
exceptions are the use of `static` for array args and `class` as a
struct field. These can be #define'ed to avoid C++ build errors.
This allows the whole project to be built as a single C++ codebase,
without having to maintain hybrid header files.
2020-06-11 12:44:36 +02:00