Commit graph

15 commits

Author SHA1 Message Date
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
Renamed from src/wlserver.h (Browse further)