Commit graph

897 commits

Author SHA1 Message Date
Joshua Ashton
6402b5cd40 steamcompmgr: Fix child window cursor barrier
If our input focus is ever a child window, we need to account for its X/Y offset in the check for warping it.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-11-22 21:43:32 -08:00
Joshua Ashton
7fd1f3c930 steamcompmgr: Implement support for override redirect windows 2021-11-22 21:43:32 -08:00
Joshua Ashton
dbdf1095f8 rendervulkan: Add --composite-debug
Adds a --composite-debug flag for displaying frame markers on alternating corners of the screen or rotating in a localized square when compositing.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-11-22 21:40:10 -08:00
Simon Ser
8be45451d9 Introduce --generate-drm-mode 2021-11-20 16:01:39 -08:00
Joshua Ashton
10dd0322d4 steamcompmgr: Resolve transient links before determining input focus
Helps with launchers like FO:NV and other games where we end up having the visuals disjoint from what we actually want to input to.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-11-20 16:00:21 -08:00
Simon Ser
e8dab4efe0 Drop unnecessary typedef 2021-11-10 18:30:47 +01:00
Simon Ser
1a2fbd5fea Switch libliftoff submodule URL to gitlab.fdo 2021-11-09 11:27:32 +01:00
Pierre-Loup A. Griffais
6831e6df2c steamcompmgr: don't repaint on focus change
This'll repaint an empty texture we don't want in a lot of cases.

Reverts part of 7796ffc130.
2021-11-07 22:46:26 -08:00
Pierre-Loup A. Griffais
5e7dcd30f8 steamcompmgr: don't focus random windows
If we don't have -e, everything will have a fake gameID to get focus.
2021-11-07 21:01:56 -08: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
Simon Ser
78a2496386 pipewire: set CORRUPTED flag when buffer params mismatch 2021-11-01 14:51:03 +01:00
Simon Ser
6be82ccabb Copy Vulkan textures in PipeWire thread 2021-11-01 10:01:32 +01:00
Simon Ser
e80e4393de Add CVulkanTexture::{m_width,m_height} 2021-11-01 09:56:08 +01:00
Simon Ser
49fb59ac56 Don't use std::unique_ptr for screenshot textures
We need to keep the screneshot textures around if they are still
ref'ed when we re-make the swapchain. std::unique_ptr makes this
impossible. Switch to std::shared_ptr, and get rid of the nLockRefs
field.
2021-11-01 09:44:51 +01:00
Simon Ser
1b9c554f32 Set name for screenshot thread 2021-10-29 17:03:37 +02:00
Joshua Ashton
c7a22d4777 Add error handling to screenshot saving 2021-10-29 13:13:23 +02:00
Joshua Ashton
0aa6761157 Introduce screenshot saving thread
Fixes hangs/stutters when taking screenshots.

Should be trivial to extend to pipewire too.
2021-10-29 13:13:23 +02:00
Joshua Ashton
dd5de82c7e Use PNG for screenshots
Closes: #291
2021-10-29 13:13:23 +02:00
Simon Ser
f3865a73bd Name our threads
Unfortunately the name length is limited to 15 characters, and the
executable name is dropped from the name if we don't include it.
2021-10-27 17:18:29 +02:00
Simon Ser
cabba8c921 drm: set mode type to USERDEF
Makes it easier to spot it in drm_info, among other things.
2021-10-26 16:29:20 +02:00
Simon Ser
93bd0e6740 build: bump min Meson version to 0.55.0
Otherwise we get this warning:

    WARNING: Project specifies a minimum meson_version '>=0.54.0' but uses features which were added in newer versions:
     * 0.55.0: {'Wrap files with patch_directory'}
2021-10-26 14:32:24 +02:00
Simon Ser
d3496fd719 drm: fix drm_set_refresh when rotated 2021-10-19 16:08:03 +02:00
Simon Ser
dd45be8eec build: check vulkan-headers dependency 2021-10-19 15:20:45 +02:00
Bas Nieuwenhuizen
7796ffc130 Force a redraw if the window focus changes.
Otherwise if all of the windows in the new situation never redraw
we never update to show the new focus configuration.

This change avoids things like stuck overlays and notification
windows if the underlying game is stuck.
2021-10-18 14:39:18 +02:00
Pierre-Loup A. Griffais
26aeebf11d steamcompmgr: publish input change count 2021-10-17 20:17:30 -07:00
Simon Ser
ba32e4df21 ime: add support for actions 2021-10-08 22:55:01 -07: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
6d2b53197e ime: introduce keycode allow-list
Some clients (Chromium…) assume keycodes are always coming from
evdev, and interpret e.g. KEY_ESC directly without using the keymap.
2021-10-08 22:55:01 -07:00
Simon Ser
2ba6eefad8 ime: check for xkb_keysym_get_name errors 2021-10-08 22:55:01 -07:00
Simon Ser
6f26dae77e ime: send void keysym before key sequence
This works around Chromium issues.
2021-10-08 22:55:01 -07:00
Simon Ser
880c87f4c5 ime: disable key repeat
Just in case.
2021-10-08 22:55:01 -07:00
Simon Ser
97623694dc ime: remove unicode keysym name workaround
It seems like xkb_keysym_get_name behaves as expected now.
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
Simon Ser
4c659c36bf Upgrade libliftoff 2021-10-08 13:47:34 +02:00
Simon Ser
c87dd2ef5c Drop loadargbcursor
This is now built-in in gamescope.
2021-10-06 18:48:47 +02:00
Pierre-Loup A. Griffais
39c9e93e0c Make default touch mode configurable. 2021-10-04 15:00:29 -07:00
Simon Ser
a5a31d46e3 Upgrade libliftoff 2021-09-30 11:22:40 +02:00
Simon Ser
21b263768f rendervulkan: order formats with alpha first
This allows the cursor to be exported as an ARGB8888 buffer suitable
for the cursor plane.
2021-09-29 19:02:18 +02:00
Simon Ser
f55106a344 drm: reset alpha prop on shutdown 2021-09-27 12:42:33 +02:00
Simon Ser
e29e375904 sdlwindow: make most variables static 2021-09-21 11:00:51 +02:00
Simon Ser
14c4b70419 build: clone stb with depth=1
We don't need to fetch full Git history.
2021-09-16 12:07:53 +02:00
Simon Ser
a15ea54ca3 ci: turn on auto features
Ensures a feature doesn't get auto-disabled because a dep isn't
found.
2021-09-15 20:02:47 +02:00
Joshua Ashton
50f695591d rendervulkan: Force nearest filtering for non-scaled and integer offset things
No reason to do linear filtering otherwise.
2021-09-15 10:58:38 -07:00
Joshua Ashton
b46cc14025 rendervulkan: Use textureLod()
May as well.
2021-09-15 10:58:38 -07:00
Joshua Ashton
320a23220a rendervulkan: Sample at texel centers
I missed adding this back in when I did the PR that was meant to fix this when I was debugging... Oops.
2021-09-15 10:58:38 -07:00
Simon Ser
3b2c8995a0 ci: fix meson invocation 2021-09-15 19:07:06 +02:00
Simon Ser
0d8afd8e51 ci: turn on werror 2021-09-15 19:03:37 +02:00
Simon Ser
1cf749c43b build: ensure wlroots has been built with libinput support 2021-09-15 18:57:44 +02:00
Simon Ser
0687d241a1 build: simplify have_xwayland check 2021-09-15 18:55:39 +02:00