You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've made a button(here's the problem) in my Waybar which on-click supposed to take screenshot using slurp and grim
I've a key binding(no problem here) in my Hyprland which also takes screenshot using slurp and grim
What I faced?
When I use the key binding(i.e. using keyboard to trigger slurp and using mouse to drag) to take the screenshot, it works perfectly fine BUT
when I click(using the mouse obviously) on the button on Waybar, it just flashes and disappear. I checked the console and it gave an output selection cancelled HOWEVER
I fixed the issue by triggering slurp with "on-click-release" instead of "on-click"
What I think is the problem?
In my guess slurp goes through 3 actions,
Triggering slurp command
Mouse click to start dragging
Mouse release to end dragging
Here, when I click the Screenshot-button(triggered 1st action), I already got my mouse in clicked state after that I release(triggered 3rd action) my mouse(thinking to start dragging), it just disappears and sends the selection cancelled as stdout because the last action has already been triggered without the 2nd action.
Possible fix
Don't cancel the selection on mouse-release if mouse-click hasn't been triggered yet, instead allow it to start dragging again.
The text was updated successfully, but these errors were encountered:
tmccombs
added a commit
to tmccombs/slurp
that referenced
this issue
Dec 29, 2023
Little Context...
slurp
andgrim
slurp
andgrim
What I faced?
When I use the key binding(i.e. using keyboard to trigger
slurp
and using mouse to drag) to take the screenshot, it works perfectly fine BUTwhen I click(using the mouse obviously) on the button on Waybar, it just flashes and disappear. I checked the console and it gave an output
selection cancelled
HOWEVERI fixed the issue by triggering
slurp
with "on-click-release" instead of "on-click"What I think is the problem?
In my guess
slurp
goes through 3 actions,Here, when I click the Screenshot-button(triggered 1st action), I already got my mouse in clicked state after that I release(triggered 3rd action) my mouse(thinking to start dragging), it just disappears and sends the
selection cancelled
as stdout because the last action has already been triggered without the 2nd action.Possible fix
Don't cancel the selection on mouse-release if mouse-click hasn't been triggered yet, instead allow it to start dragging again.
The text was updated successfully, but these errors were encountered: