bspwm icon indicating copy to clipboard operation
bspwm copied to clipboard

focus gets lost after taking screenshot via flameshot

Open amosbird opened this issue 4 years ago • 7 comments

https://github.com/lupoDharkael/flameshot/issues/784

amosbird avatar Jul 28 '20 15:07 amosbird

To Reproduce In bspwm, open any tiled window, invoke flameshot, press esc, the tiled window doesn't get the focus back.

I'm using the same version you are using:

$ flameshot --version
Flameshot v0.6.0
Compiled with Qt 5.14.1

I have never used flameshot before. Can you tell me how to invoke flameshot to reproduce this? I tried flameshot full --clipboard, but I couldn't reproduce the problem with that.

emanuele6 avatar Jul 29 '20 14:07 emanuele6

it's just flameshot gui.

amosbird avatar Jul 29 '20 15:07 amosbird

it's just flameshot gui.

I also tried that, it just exits immediately:

https://user-images.githubusercontent.com/20175435/164890841-3530c5dc-d78e-4bff-96f1-8b1edecc3ec2.mp4

emanuele6 avatar Jul 29 '20 16:07 emanuele6

I can reproduce this! I'm not sure if it's the WM or flameshot though. I remember other programs doing something similar but never bothered to report this because I felt it was easy enough to re-focus by focusing something else.

@emanuele6 that's strange, seems like another issue.

SeerLite avatar Jul 31 '20 23:07 SeerLite

an unmanaged window that gains focus will cause this behavior (no window will regain bspwm focus). i think that is probably what's going on here.

ortango avatar Aug 02 '20 20:08 ortango

That makes sense. Is there a way for bspwm to handle that and regain focus?

SeerLite avatar Aug 02 '20 20:08 SeerLite

for actually fixing the issues - it's over my head.

i tried flameshot out. it runs in the background and pops the capture widget when requested -flameshot gui will exit immediately. so, doing something like flameshot gui; bspc node -f will not work... bspc node -f will regain input focus though.

in its current state flameshot does not build with newest QT. trying to change from setFocus() to grabKeyboard/Mouse is more trouble then it is worth for me (i don't know if it will work out anyway). flameshot's uses of setFocus seems buggy anyway because you can change focus away from it while the capture widget is open.... it does not handle that situation correctly.

bspwm does see the unmap events for flameshot's widget though - maybe you can add a hack to bspwm there...

ortango avatar Aug 03 '20 21:08 ortango