Commit graph

106 commits

Author SHA1 Message Date
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
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