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
Simon Ser
a325cf193b
Use wlroots' wl_drm implementation
...
wl_drm is not available on Vulkan.
References: https://github.com/swaywm/wlroots/pull/2708
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
54e6614e2c
wlserver: stop setting keyboard in wlserver_new_input
...
This avoids messing up with the current keyboard settings when a
new one is plugged in.
2021-09-14 13:56:33 +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
Simon Ser
1694e0c4f7
wlserver: handle null keyboard in wlserver_keyboardfocus
2021-09-14 13:44:35 +02:00
Simon Ser
16211ba7ca
wlserver: expose nested refresh if set
...
Instead of faking an output with the KMS mode's refresh rate,
expose the nested refresh rate when -r is set.
2021-09-14 08:24:07 +02:00
Valentin David
5672737093
wlserver: Add support for mouse wheels
2021-09-13 23:17:34 +02:00
Simon Ser
90f3a13c13
Drop trailing spaces
2021-09-13 23:14:57 +02:00
Valentin David
a8ba73b8ae
wlserver: Force reading XKB_DEFAULT_* variables
...
When gamescope has cap_sys_nice capability, then `secure_getenv` used
by libxkbcommon does not load the keymap configuration from
environment. So the environment variables have to be manually read from
gamescope.
Without `XKB_DEFAULT_LAYOUT` it is not possible to load other keymaps
than US.
2021-09-13 23:06:37 +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
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