bspwm icon indicating copy to clipboard operation
bspwm copied to clipboard

Float windows sometimes falling behind Tiled

Open jupart opened this issue 7 years ago • 33 comments

Sometimes, float windows fall behind tiled windows and are very hard to find/get a hold of. As of now, I haven't been able to tell the cause or steps to reproduce, but will update if I do. I know of another user on IRC that said he had experienced as well.

jupart avatar Jun 01 '17 13:06 jupart

Here's my config:

#! /bin/sh

xrandr --output DP-2 --auto --primary
xrandr --output HDMI-0 --auto --right-of DP-2

killall sxhkd
sxhkd &

bspc monitor DP-2 -d web chat elec IV
bspc monitor HDMI-0 -d term elec2 music VIII

bspc config border_width         2
bspc config window_gap           4

bspc config split_ratio          0.50
bspc config borderless_monocle   false
bspc config gapless_monocle      true

bspc rule -a Firefox desktop=^1
bspc rule -r Firefox split_ratio=0.6
bspc rule -a Audacious desktop=^8
bspc rule -a GerbView state=floating
bspc rule -a Gedit state=floating
bspc rule -a Eog state=floating
bspc rule -a Nautilus state=floating
bspc rule -a File-roller state=floating
bspc rule -a Gnome-system-monitor state=floating
bspc rule -a Screenkey manage=off
bspc rule -a Empathy state=floating
bspc rule -a ccstudio desktop=^9
bspc rule -a Gpick state=floating
bspc rule -a Pidgin state=floating
bspc rule -a "Kicad_py_tool.py" state=floating
bspc rule -a Evince state=floating
bspc rule -a OpenSCAD state=floating
bspc rule -a Window state=floating
bspc rule -a qutebrowser state=floating
bspc rule -a Polybar state=floating
bspc rule -a Conky state=tiled split_ratio=0.81
bspc rule -a VirtualBox state=floating
bspc rule -a python3.5 state=floating

bspc config pointer_action1 move
bspc config pointer_action2 none
bspc config pointer_action3 resize_corner
bspc config click_to_focus true
bspc config focus_follows_pointer true

bspc config active_border_color "#555753"
bspc config focused_border_color "#d79921"
bspc config normal_border_color "#282828"

xsetroot -cursor_name left_ptr

feh --bg-scale "/usr/share/xfce4/backdrops/xubuntu-development.png" --bg-scale "/usr/share/xfce4/backdrops/xubuntu-development.png"

setxkbmap -option 'caps:ctrl_modifier'
xcape -e 'Caps_Lock=Escape'
setxkbmap -option 'caps:ctrl_modifier'~
setxkbmap -option 'caps:ctrl_modifier'
xcape -e 'Caps_Lock=Escape;Control_L=Escape;Control_R=Escape'

xset r rate 250 33

killall unclutter
killall empathy
killall compton

unclutter &
empathy &
compton -b
compton -c --config ~/.config/compton.conf -b

jupart avatar Jun 14 '17 15:06 jupart

This is definitely triggered by opening Virtualbox, even in a float window.

jupart avatar Jun 15 '17 18:06 jupart

I've also come into this issue when using the pass password manager and the window asking for the gpg password comes up behind all my other tiled windows. This has only happened recently with one of the latest commits.

15bitgames avatar Jun 16 '17 03:06 15bitgames

I have the exact same issue described by @z1lt0id. Specifically, gpg dialog goes below any other window instead of on top and becomes unselectable. I just run git bisect and I found that commit b181b5c7756b2726304f8ea852cbb637394672c0 is where this issue sits. Hope it helps.

ghost avatar Jun 20 '17 11:06 ghost

@oceans112 What's the output of xprop for the GPG dialog?

baskerville avatar Jun 22 '17 14:06 baskerville

xprop doesn't show any output. I've to say that that gpg dialog is actually dmenu. Reverting that commit solves this issue, but i can't understand how rules can affect this.

Thank you for your time, btw

ghost avatar Jun 22 '17 16:06 ghost

Could you provide some steps to reproduce the issue?

baskerville avatar Jun 22 '17 16:06 baskerville

I was wrong, it's the pinentry dialog that goes below other windows, not dmenu. The easiest way that i could find to reproduce this issue is launch pinentry-gtk-2 and give the command getpin in a not empty desktop.

ghost avatar Jun 22 '17 17:06 ghost

I just noticed that the keyboard focus is correct, if i type i actually write in the pinentry dialog, but still it's below other windows (i noticed that using a non-opaque console as other window).

ghost avatar Jun 22 '17 17:06 ghost

The issue I'm facing happens whenever I open a Virtualbox guest. This affects all float windows across all workspaces after that until I restart my machine, causing all float windows to fall behind tiled windows (not just windows associated with Virtualbox).

jupart avatar Jun 23 '17 13:06 jupart

@jupart cc3d306 fix this issue for you?

0x647262 avatar Jun 29 '17 00:06 0x647262

Indeed it does. Thanks for bringing it up.

jupart avatar Jun 29 '17 13:06 jupart

I don't think so: the regression was introduced 21 days ago and the issue was created 28 days ago.

baskerville avatar Jun 29 '17 16:06 baskerville

@baskerville You're right, it does fix popups like "Open file", etc. though, so it's a step in the right direction. The issue where opening a Virtualbox guest "relayers" all floating windows behind tiled still exists though.

jupart avatar Jun 30 '17 12:06 jupart

I recently noticed if I remove bspc rule -a VirtualBox state=floating from my bspwmrc, this problem no longer happens.

jupart avatar Jul 10 '17 20:07 jupart

I also ran into problems with certain popups, such as the GPG password popup, floating behind tiled windows, but this rule fixed that for me:

bspc rule -a \* node=.floating layer=above

msteen avatar Jul 11 '17 20:07 msteen

I'm afraid node=.floating isn't valid: the descriptor can only be omitted with query -{M,D,N} ... and node=NODE_SEL is a consequence (it sets the insertion point of the upcoming window) not a filter.

So the aforementioned rule just sends everything to the above layer.

baskerville avatar Jul 12 '17 12:07 baskerville

Aha, I did not know that. Well then, in that case, all I can say is that sending everything to the above layer made everything work the way I expect (floating windows always on top of tiled), but I understand that it is not a correct solution. Thanks for clearing that up!

Edit: After updating to the latest git version, sending all the windows to the above layer no longer works, but then again, it is also no longer necessary. I think I was just using the version which still had the bug where sending something to the above layer sent it to the below layer. And since dialogs and such are send to the above layer, they were actually sent to the below layer, causing them to be shown behind the tiled windows that were in the normal layer. So by sending all my windows to the above layer, I was actually sending them all to the below layer, causing the dialogs and windows to be on the same level.

msteen avatar Jul 12 '17 19:07 msteen

I recently updated and it started doing that for me as well! :confused: bspwmrc: https://gist.github.com/skjnldsv/927b0d757d0e6ac90a9f1058ee0122d9 sxhkdrc: https://gist.github.com/skjnldsv/f2f41433e271549789e598becbdc35e2

skjnldsv avatar Apr 06 '19 06:04 skjnldsv

@skjnldsv i got this also today

@baskerville here image

one terminal open 2 pcmanfm-qt in one of them i select rclick -> make new folder in the lower corner pcmanfm window (music) in the image you can see the dialog box to set the name of the folder and does open behind the bigger pcmanfm

this used to happen all the tiem few versions ago when using tellico and editing a book ( not longer happens today)

it can be something related to qt?

icf20 avatar May 26 '19 19:05 icf20

No idea, but it is still happening! It's happening for all qt apps indeed! @baskerville any idea here?

skjnldsv avatar Sep 08 '19 07:09 skjnldsv

This is happening to me as well. Floating videos opening behind my thunar is annoying.

dhsdshdhk avatar Sep 21 '19 02:09 dhsdshdhk

xtruss might be helpful here.

baskerville avatar Sep 21 '19 08:09 baskerville

@baskerville what can we do to help? :) I also encountered non qt apps behaving the same! I thought we had narrowed it a bit, but apparently not!

skjnldsv avatar Sep 21 '19 10:09 skjnldsv

You could record the events with xtruss.

baskerville avatar Sep 21 '19 15:09 baskerville

Here are the logs @baskerville The nextcloud app is behind all windows

# Opening nextcloud app
03200000: --- XKEYBOARD:UnknownEvent0
03200000: --- PropertyNotify(window=w#00000167, atom=a"_NET_ACTIVE_WINDOW", state=NewValue, time=0x4CAC094F)
03200000: --- PropertyNotify(window=w#00000167, atom=a#330, state=NewValue, time=0x4CAC094F)
03200000: --- PropertyNotify(window=w#00000167, atom=a#330, state=NewValue, time=0x4CAC0953)
03200000: --- PropertyNotify(window=w#00000167, atom=a#328, state=NewValue, time=0x4CAC0954)
03200000: --- PropertyNotify(window=w#00000167, atom=a"_NET_ACTIVE_WINDOW", state=NewValue, time=0x4CAC0955)
03200000: --- PropertyNotify(window=w#00000167, atom=a#330, state=NewValue, time=0x4CAC0955)
05800000: --- SendEvent-generated ClientMessage(window=w#0060001A, type=a"_NET_ACTIVE_WINDOW", format=32, data=00000001:4CAC0954:00000000:00000000:00000000)
03200000: --- SendEvent-generated ClientMessage(window=w#0060001A, type=a"_NET_ACTIVE_WINDOW", format=32, data=00000001:4CAC0954:00000000:00000000:00000000)
# Closing nextcloud app with ESC
03200000: --- XKEYBOARD:UnknownEvent0
03200000: --- PropertyNotify(window=w#00000167, atom=a#328, state=NewValue, time=0x4CAC13A2)
03200000: --- PropertyNotify(window=w#00000167, atom=a#330, state=NewValue, time=0x4CAC13A3)
03200000: --- PropertyNotify(window=w#00000167, atom=a"_NET_ACTIVE_WINDOW", state=NewValue, time=0x4CAC13A3)
03200000: --- PropertyNotify(window=w#00000167, atom=a#330, state=NewValue, time=0x4CAC13A4)

# Opening nextcloud app
05c00000: --- XKEYBOARD:UnknownEvent0
05c00000: --- PropertyNotify(window=w#00000167, atom=a"_NET_ACTIVE_WINDOW", state=NewValue, time=0x4CAD49B5)
05c00000: --- PropertyNotify(window=w#00000167, atom=a#330, state=NewValue, time=0x4CAD49B5)
05c00000: --- PropertyNotify(window=w#00000167, atom=a#330, state=NewValue, time=0x4CAD49B5)
05c00000: --- PropertyNotify(window=w#00000167, atom=a#328, state=NewValue, time=0x4CAD49B6)
05c00000: --- PropertyNotify(window=w#00000167, atom=a"_NET_ACTIVE_WINDOW", state=NewValue, time=0x4CAD49B6)
05c00000: --- PropertyNotify(window=w#00000167, atom=a#330, state=NewValue, time=0x4CAD49B6)
05c00000: --- SendEvent-generated ClientMessage(window=w#0060001A, type=a"_NET_ACTIVE_WINDOW", format=32, data=00000001:4CAD49B6:00000000:00000000:00000000)
05e00000: --- SendEvent-generated ClientMessage(window=w#0060001A, type=a"_NET_ACTIVE_WINDOW", format=32, data=00000001:4CAD49B6:00000000:00000000:00000000)
# Setting nextcloud app as tiled
05c00000: --- XKEYBOARD:UnknownEvent0
05c00000: --- XKEYBOARD:UnknownEvent0
05c00000: --- PropertyNotify(window=w#00000167, atom=a#330, state=NewValue, time=0x4CAD4F28)
# Closing nextcloud app with ESC
05c00000: --- XKEYBOARD:UnknownEvent0
05c00000: --- PropertyNotify(window=w#00000167, atom=a#328, state=NewValue, time=0x4CAD53BE)
05c00000: --- PropertyNotify(window=w#00000167, atom=a#330, state=NewValue, time=0x4CAD53BE)
05c00000: --- PropertyNotify(window=w#00000167, atom=a"_NET_ACTIVE_WINDOW", state=NewValue, time=0x4CAD53BE)
05c00000: --- PropertyNotify(window=w#00000167, atom=a#330, state=NewValue, time=0x4CAD53BE)

skjnldsv avatar Sep 23 '19 14:09 skjnldsv

I also have this issue. It doesn't happen every time, It works fine for a while, then something triggers it, and then all floating windows end up behind tiling windows if they are focused (with focus_follows_pointer, they are above the tiled windows until I move the mouse).

Do you want x events of it being moved behind other windows, or of when the issue starts occuring?

Edit: Looks like I found the offending program in my case. If sc-controller is running and is in floating mode, all floating windows, including sc-controller itself have the issue. If I make it tiled, the issue goes away

Edit 2: When this happens, another issue happens as well. Switching between recent windows in monocle-mode doesn't work. The focus changes, but the same window is always on top. This does not seem to be fixed by making sc-controller tiled.

Also, I think I've had sc-controller running in floating mode before without issues. I.e. something else is triggering this bug

Edit 3: Here is an xtruss log of me toggling between windows in a monocle layout. https://gist.github.com/TheZoq2/517eeb31ccd4d562b0b1da2230acab7f.

TheZoq2 avatar Sep 29 '19 16:09 TheZoq2

@baskerville this is still happening after a few years :( This is really frustrating and I don't know how can I fix it.

What could I provide so it helps you debug further? For example I want to have a floating music player on all desktop, it will end up behind all tiled windows, making it quite unusable :(

skjnldsv avatar Jul 07 '20 08:07 skjnldsv

Same for me in 2021, any update/workaround?

kranzo avatar Mar 13 '21 09:03 kranzo

I encountered the problem again and had some timer to tinker around:

i can now reproduce some similar behavior

switching a window layer to below/above (tiled or floating doesnt matter) pulls it to the top and keeps every other window below.

the only way to revover normal behavior

  1. set layer back to normal
  2. set state to floating
  3. pull an other floating window to the top (clicking it)
  4. focus the window in the background (keep it below)
  5. switch it to tiling

now it behaves well again with the floating layer (monocle still broken) if i can do any testing i'm happy about ideas.

kranzo avatar May 02 '21 07:05 kranzo