horriblename / hyprgrass

hyprland plugin for touch screen gestures
BSD 3-Clause "New" or "Revised" License
302 stars 13 forks source link

Block gesture inputs #147

Open System64fumo opened 3 months ago

System64fumo commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 2 months ago

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

EDIT: nevermind, the first problem still not fixed