hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
18.28k stars 762 forks source link

Slurp: Cannot select an area within (some?) XWayland games/applications #1996

Open Fleimi opened 1 year ago

Fleimi commented 1 year ago

Slurp seems to be unable to select an area inside of most games I've tried.

For example, in Final Fantasy XIV, calling grim -g "$(slurp -w 0)" - | wl-copy whitens the screen indicating a selection is taking place, but clicking and dragging inside the game doesn't select anything and the selection mode doesn't end. Moreover, trying the press Escape to cancel the selection also doesn't do anything. The only way to back out of the selection is to switch to another workspace and press Escape or select an area as normal and make a successful selection/screenshot.

I tried with Sway, working as intended. I tried with windowrule=nofocus,title:(FINAL FANTASY XIV), and while this results in working Slurp selection, it also results in an un-interactable game window and as such is not a working fix in the end.

Sid127 commented 1 year ago

Can confirm, I have a feeling we're missing something similar to this commit where the fullscreen container isn't handing over the cursor to any shell-layers on top of it

vaxerski commented 1 year ago

should be fixed with 1e526411b6207349f1ea0341ab3319ff880a898d

Sid127 commented 1 year ago

can confirm, thanks for the fix!

Sid127 commented 1 year ago

unrelated issue that just popped up: inputs lock up and aren't passed to games even if no shell layer is active... unless mangohud counts as a shell layer. I'll report in a moment when I test that.

EDIT: Still locks up with mangohud disabled

Sid127 commented 1 year ago

Confirmed it doesn't happen without that commit, both with and without mangohud

vaxerski commented 1 year ago

what app? I can't repro, seemed to work fine.

Sid127 commented 1 year ago

Quake Champions for me, I can test it out in another game if need be as well

vaxerski commented 1 year ago

reverted the commit, will investigate more

Fleimi commented 1 year ago

Can confirm, with the commit keyboard input stopped working for FFXIV entirely, and conversely mouse input was perma-locked to FFXIV even after switching workspaces. Windowed/fullscreen didn't seem to make a difference

Rabcor commented 4 months ago

This is still an issue, happens to me in some games. for instance in valheim running natively it works, but only in the menus, if you're actually playing slurp will not allow you to select.