-
Notifications
You must be signed in to change notification settings - Fork 304
Input holding: Implement libinput evdev device holding on SDL and Wayland backends. #1897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Input holding: Implement libinput evdev device holding on SDL and Wayland backends. #1897
Conversation
… masking, cursor / mouse somewhat broken due to existing bug in software cursor compositor.
…wayland working but possiable existing race conditon observed.
|
The software cursor seems to not render in certain instances. PrismLauncher for Minecraft does show a cursor in the launcher, but not in-game. Left 4 Dead 2 does properly display the cursor. Will have to test with more games/applications, but my initial guess is that it may have something to do with the game's rendering API? (Minecraft is OpenGL while L4D2 was run in Vulkan with |
|
Also, when starting through terminal, if you specify |
Gamescope is generally assumed to be used from an automated sense, and adding a timeout would be difficult, as there is no way to know when the person releases the enter key, and thus is safe to grab. We could do some checks before we bind to it, but it may be over complicated for no real reason. Do you have any other ideas for it, because I don't think a timeout would work well for this part of the program, if we are doing cmdline testing for this, you can use a |
104e21d to
fe7c52a
Compare
|
Sorry, just realized when changing some typos I forgot to add the submodules to my gitignore. I force-pushed a change that removed the |
…e gamescopectl's overrides work properly again.
|
Tested in games: Chivalry 2, Magicka 2, Terraria, Helldivers 2 Edit: Holding a mouse in prismlauncher doesn't show any cursor but it does work upon specifying --backend-disable-mouse Edit 2: |
|
Tested with just minecraft(prismlauncher), works great, |
I believe this to be unrelated to input holding as it happens with gamescope without it |
Okay, sorry, it seems I have done too little testing with |
|
Hey, happy to see more comments on this! While it is not ready for merging currently in my testing branch, I have a few new changes I was wondering if I should add to this branch, mainly that being of toggling keyboard / mouse grab when a key is pressed. Currently, keyboard grabbing is done instantly on running gamescope (with this patch), but I was thinking of following the (somewhat) convention of the Now, I am asking because I see it implemented in the SDL backend (just telling SDL to grab it) and being entirely faked in the WAYLAND backend, just changing the window title to (grabbed) <title> without actually doing anything? (source) Also, to allow this to work, and to allow expansion, or possible implementation of other keybinds, I used a Code I changed to add this, and another feature to my testing branch; would not be committed as is, just showing as to get opinions on these types changes: davidawesome02-backup@a9bd04c @wunnr Would you be interested in this? I implemented it in my version of your project, and if I push this into this version up here, the default would change, requiring |
Unfortunately, I can't help you with the code, but I do believe |
Added command line options to allow users to disable default window input processing, and enable mouse and keyboard processing via evdev paths. When using disabled mouse on window, and using passed through mouse, gamescope mouse compositing is enabled, to allow users to see the mouse pointer.
Intended to allow client isolation, and what is essentially a continuation of multiseating in a subcompositor rather than as a standalone compositor. Doing this separation and device holding in a subcompositor allows for actions including single GPU and monitor gaming with multiple people.
As stated in my original issue #1771 , this would essentially be a continuation and introduction into the wayland space of a process that was able to be used previously in the
xephyrproject, back when it had a evdev / libinput backend.These changes currently only work on the X11 backend (SDL) and Wayland backend, with the libinput changes allowing VR to specify devices to hold, although this is untested and seems to be unhelpful in that area.
These changes may also help in the development of split screen gaming on linux in a more complete fashion, in projects similar to and including partydeck
Feel free to ask for any changes that may be required to merge, this is my first contribution to this project, or really any outside of personal ones, so let me know if any changes are required.
--libinput-hold-devis used by passing--libinput-hold-dev /dev/input/by-id/USB-...,/dev/input/by-id/...or in multiple arguments, while the options--backend-disable-keyboardand--backend-disable-mouseare passed with no arguments, and simply disable the backend's keyboard and mouse processors.