Simon Ser
fc748ebd78
wlserver: remove wlserver_run return value
...
It always returns 0.
2021-09-10 11:01:54 +02:00
Simon Ser
597fc8fa48
Move signal handler to main
2021-09-09 19:49:31 +02:00
Pierre-Loup A. Griffais
5d3a0eb078
Repaint on possible connector hotplug
2021-09-02 17:18:13 -07:00
Simon Ser
22323418ac
wlserver: set wlroots log handler
2021-09-01 18:31:45 +02:00
Simon Ser
c034ac1f99
wlserver: use log scope
2021-09-01 18:25:24 +02:00
Simon Ser
ef64b60cec
Add gamescope-pipewire protocol
...
Can be tested with:
https://git.sr.ht/~emersion/gamescope-pipewire-demo
2021-08-31 17:06:49 +02:00
Simon Ser
82ef0372d5
Introduce thread-safe take_screenshot
2021-08-31 17:06:49 +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
538610154c
wlserver: make more variables static
2021-08-03 11:33:12 +02:00
Simon Ser
482f1f3b0b
wlserver: stop using headless backend for keyboard
...
The headless backend forces a wlroots renderer to be initialized.
Stop using it, so that it's easier to get rid of the headless
backend altogether.
2021-08-03 11:04:00 +02:00
Simon Ser
ee96a669ef
wlserver: check wlr_output_commit return value
2021-08-03 10:42:54 +02:00
Simon Ser
0034d492d8
wlserver: create wl_output before starting Xwayland
...
Apparently there's a race that makes Steam unhappy and fail with:
libGL error: failed to create drawable
Closes: https://github.com/Plagman/gamescope/issues/228
2021-08-02 18:16:09 +02:00
Simon Ser
f1eb06d9b7
drm: add explicit needs_modeset flag
2021-07-28 18:17:07 +02:00
Simon Ser
24fe84c402
drm: reload our internal state on hotplug
2021-07-28 17:58:07 +02:00
Simon Ser
fae6bfc411
drm: refresh props after VT switch
2021-07-28 17:47:41 +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
5f638dd780
wlserver: add missing newline to error log
2021-07-27 10:31:34 +02:00
Simon Ser
f33b040ba7
Move steamcompmgr init out of wlserver
2021-07-27 10:30:14 +02:00
Simon Ser
0f0489b455
wlserver: wait for Xwayland to be ready in wlserver_init
...
We''l be able to move some init bits out of wlserver with this.
2021-07-27 10:25:56 +02:00
Simon Ser
5fedd45d2f
Switch to poll
...
epoll doesn't offer any benefit for our use-case. select is old.
Let's just make things consistent and use the portable poll
everywhere.
2021-07-25 20:42:16 +02:00
Simon Ser
52063b3858
wlserver: improve wlr_session_create error handling
2021-07-22 15:09:10 +02:00
Simon Ser
96346bd5f1
wlserver: remove unnecessary wlr_backend_is_headless check
...
A headless backend will always pass this check.
2021-07-22 15:01:09 +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
2807bb27c1
Fix NULL g_XWLDpy
...
The previous commit stopped using the X11 server for nudging the
XWM. Thus g_XWLDpy has been dropped. However we still need it to
send XTest events.
2021-06-16 09:17:45 +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
Simon Ser
9d40b61645
wlserver: prevent list corruption on double wlserver_surface_set_wl_id
2021-05-20 17:40:20 +02:00
Pierre-Loup A. Griffais
e25f871d87
wlserver: avoid accessing mouse_focus_surface after destruction
...
We should also set the focus to something else that makes sense, which
means there's another bug in a higher-level layer somewhere, but at least
don't crash.
2021-05-05 16:37:51 -07:00
Pierre-Loup A. Griffais
496b5f58d2
wlserver: downgrade wlserver_surface_set_wl_id assert to spew
2021-04-30 18:45:00 -07:00
Pierre-Loup A. Griffais
2bb4907993
Also spew wayland display name through session pipe.
2021-04-27 21:17:36 -07:00
Simon Ser
be735e9360
Set GAMESCOPE_WAYLAND_DISPLAY
...
This allows gamescope-specific Wayland clients to connect to the
Wayland server, while preventing regular Wayland clients from doing
so.
2021-04-20 09:13:10 +02:00
Simon Ser
a05e5b0a39
Implement gamescope-xwayland protocol
2021-04-20 09:13:10 +02:00
Simon Ser
10816e6ed8
wlserver: adjust assertion in wlserver_surface_set_wlr
...
Make sure we don't overwrite an existing surf->wlr. We don't really
care about the Wayland surface ID here.
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
Sefa Eyeoglu
ed44909813
Update wlroots to 0.13.0
...
Update usage of wlr_headless_backend_create,
wlr_renderer_get_shm_texture_formats,
wlr_texture_from_pixels and add missing include for render/egl.h.
2021-04-08 09:15:05 +02:00
Simon Ser
c834999a5f
Introduce wlserver_surface
2021-04-02 08:37:53 +02:00
Simon Ser
df18c40815
Only advertise scanout capable modifiers
2021-04-01 17:41:06 +02:00
Simon Ser
29d00dbc68
tracing: use {begin,end}_ctx helpers, remove unnecessary newlines
2021-03-11 11:25:34 +01:00
Simon Ser
1b38faf9fd
Fix double-unlock on wl_event_loop_dispatch error
2021-02-01 15:27:21 +01: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
Simon Ser
fbc6bd0c08
Update wlroots and libliftoff
2020-12-16 11:52:28 +01:00
Pierre-Loup A. Griffais
667d8afc54
wlserver: was wrong clickmode, we want 4, also fix some logic issues
2020-09-23 15:22:42 -07:00
Pierre-Loup A. Griffais
4f70525fc6
wlserver: add touch passthrough support, if clickmode == 0
2020-09-18 14:59:26 -07:00
Pierre-Loup A. Griffais
fd7a81547a
vblankmanager: obey nested refresh rate if set
2020-09-15 14:46:12 -07:00
Simon Ser
c2d9b23d08
Hold buffers till steamcompmgr processes them
2020-09-01 12:36:35 -07:00
Pierre-Loup A. Griffais
2a98d2b85a
wlserver: use gamescope-N wayland display name.
...
Letting wayland use the default makes random things connect to us, which we
don't want.
Fixes https://github.com/Plagman/gamescope/issues/96 .
Related to the va-api problem, but most likely not the only fix:
https://github.com/Plagman/gamescope/issues/23
2020-09-01 11:52:55 -07:00
Pierre-Loup A. Griffais
df38bea747
Implement screenshot support.
...
Mostly in rendervulkan. Super+S or SIGUSR2.
2020-08-29 21:33:14 -07:00