Skip to content
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

Block gesture inputs #147

Open
System64fumo opened this issue Aug 11, 2024 · 5 comments
Open

Block gesture inputs #147

System64fumo opened this issue Aug 11, 2024 · 5 comments

Comments

@System64fumo
Copy link

When performing a touch gesture, Such as a bottom one.
If the gesture is active (Triggered) block the touch input from going to the underlying program

Current behavior:
Start swiping from the bottom
Screen starts shifting workspaces
Program receives touch inputs and performs touchy things

Desired behavior:
Start swiping from the bottom
Screen starts shifting workspaces
Program has no clue you ever did something or that the input got cut off (Focus loss)

No clue if this is possible though

@horriblename
Copy link
Owner

currently we:

  1. block touch events going to the window as soon as we recognize a gesture (for a edge swipe, after you swipe a bit, it blocks touch events then begins the workspace swipe thingy)
  2. send a touch up event when you lift a finger

This does work on my machine, so... gonna need you to reconfirm what you saw is breaking what I described

small note: the correct thing to do is to send a "cancel" event to the window but that crashed on me last I tried it, and I never bothered to look into it

@System64fumo
Copy link
Author

Weird.. haven't noticed this working myself
A good example of where i notice touch events still going through would be my app launcher (sysmenu) which has a swipe up to open gesture (layer shell and whatnot)
Whenever i swipe it used to detect touch inputs and thus begin the opening animation

Another place i noticed this would be the OSK i use (wvkbd) it would usually press the spacebar if i were to start swiping from the bottom

Have not had time to re test any of this so it might have been fixed with the margins update

@horriblename
Copy link
Owner

Ah, in the first case it's my bad, for normal hyprgrass-bind actions events don't get blocked, I'll come up with a solution

In the second case the cancel event I mentioned before should fix it, will give it a go another time

@System64fumo
Copy link
Author

Awesome!
In the mean time i've resorted to adding a margin blocker on my app launcher and written a new OSK with bottom padding

I wonder if only layer shells are affected because i've only noticed those being affected

@horriblename
Copy link
Owner

horriblename commented Aug 25, 2024

#152 might fix both your problems, or at least the second one

EDIT: nevermind, the first problem still not fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants