Repository navigation
Prevent global window from getting focus on tag switch #1420
|
I'm using the scroller layout, and open mpv as a floating global window with this rule:
It opens without focus and if it never gets focus everything works normally: As I switch between tags, whatever window last had focus on a tag regains focus when I switch back to it. After the global window (mpv) gets focus once, however, every time I switch tags the focus moves back to mpv, regardless of what had focus previously. Is there any way to prevent the global window from stealing focus? Even something like, "Never give this window focus ever." I don't really need to interact with it and am ok killing it through another means or letting it close itself when the media ends. I've attached a video to demonstrate. I had to crush the quality to get the file small enough, but hopefully it shows what I mean. For the first 30 seconds I switch back and forth without focusing mpv and stuff works as expected. Once mpv gets focus, it keeps regaining focus every time I switch tags, no matter how I take focus off of it. When focused it has a bright pink border, and I ran mmsg to show when it has focus. mpv_scaled.mp4 |
Replies: 1 comment
|
Swap windowrule=appid:mpv,width:230,height:230,offsetx:99,offsety:-103,isfloating:1,isunglobal:1,isopensilent:1It still shows on every tag, but mango skips it when picking what to focus after a tag switch, so each tag goes back to its own last window (on 0.17.5 anyway, thats what I tried). It's in the rules docs for camera windows and desktop pets. It also drops out of With It can still be focused directly. If you'd rather it never was, add |
Swap
isglobal:1forisunglobal:1:windowrule=appid:mpv,width:230,height:230,offsetx:99,offsety:-103,isfloating:1,isunglobal:1,isopensilent:1It still shows on every tag, but mango skips it when picking what to focus after a tag switch, so each tag goes back to its own last window (on 0.17.5 anyway, thats what I tried). It's in the rules docs for camera windows and desktop pets. It also drops out of
focusstack, the switcher and overview.With
isglobalit happens beacuse there's one focus history for all tags, and a switch focuses the most recent visible window in it. A global window is visible everywhere.It can still be focused directly. If you'd rather it never was, add
nofocus:1to the …