baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.81k stars 416 forks source link

Treat fullscreen windows specially? #301

Closed eigengrau closed 9 years ago

eigengrau commented 9 years ago

Is there any way of emulating the special treatment of fullscreen windows after the recent changes on the master branch? I’ve noticed your fullscreen daemon script, but even when using this working with fullscreen windows gets pretty wonky when compared to the original behavior. Things I’ve noticed / wished for while briefly working with the latest master thus far:

  1. Even when running the fullscreen daemon script, lemonbar will still occasionally be put on top of fullscreen windows. One way I can reproduce it (most of the time) is by opening a bunch of terminals on top of the fullscreen window and closing them all in rapid succession. On other occasions, it just seems to come up randomly while switching to a workspace with a fullscreen window focused.
  2. Is there some way of automatically disengaging fullscreen-mode when a new window comes up on the same workspace? Currently, new windows will open on top of the fullscreen window, but the resulting tree will have missing elements (I presume these are now below the semi-fullscreen window, so the tree is oddly split up between different stacking layers), and some windows will suddenly pop up into the tree when navigating between windows. I don’t know whether there’s some great usecase for having a partial window tree on top of fullscreen applications, but it would be nice if the old behavior could be toggled somehow.
rr- commented 9 years ago

I don’t know whether there’s some great usecase for having a partial window tree on top of fullscreen applications

There is - consider floating popups when browsing anything fullscreen. Previously it retiled your fullscreen window.

baskerville commented 9 years ago
  1. Could you try xdo above -t $(xdo id -N Bspwm -n root | sort | head -n 1) PANEL_WID (requires 2f93d90)?
  2. What I might do is to disengage any fullscreen window above the focused window (in a given desktop).
baskerville commented 9 years ago

@eigengrau The behavior of fullscreen windows should be improved as of 516c974 (while still allowing floating windows to sit on top of fullscreen windows).

rr- commented 9 years ago

Confirmed that

xdo above -t "$(xdo id -N Bspwm -n root | sort | head -n 1)" $(xdo id -n panel)

does what's needed, including proper support for multihead desktops (the previous scripts worked weird in this regard.)

eigengrau commented 9 years ago

Thanks! I’ve quickly tried out 516c974 (using the amended fullscreen daemon), and fullscreen windows seem to disengage as expected. Awesome! ❤

While experimenting, I’ve noticed one minor remaining issue relating to fullscreen & input focus:

  1. Toggle fullscreen=on for some window A.
  2. Create a new, floated window B, on top of A.
  3. Toggle fullscreen=on for window B.
  4. Toggle window B fullscreen=off.
  5. Observe that window A is now shown fullscreen, but window B (now hidden behind A) still has focus.

Maybe this can somehow be treated so that whenever a fullscreen window is shown above everything else, the focus goes to the fullscreen window.

baskerville commented 9 years ago

You no longer need a fullscreen daemon: the xdo above ... command only needs to be run once.

The aforementioned issue is fixed by f08e707.

eigengrau commented 9 years ago

You no longer need a fullscreen daemon

Ah, good to know. I had some problems with the ordering between lemonbar and stalonetray being reset after disengaging fullscreen, and still needed the full-screen daemon to reset it. But this doesn’t appear to happen anymore with f08e707 and when setting the ordering between the two just once upon init.

Many thanks for addressing this! 👍

One «luxury problem» I’ve discovered on f08e707 is that you can open a floated window (a) on top of the first fullscreen window (b) just fine; but when you then fullscreen b, and create another floated window, window b will be de-fullscreened (video). Might not be too pressing an issue, though.

baskerville commented 9 years ago

The problem is that the second fullscreen window is floating, so the final floating window isn't strictly above it.

eigengrau commented 9 years ago

Ah, I see. I’ve changed the fullscreen binding accordingly, and indeed the previous window will remain fullscreened when I use this:

super + f
    bspc window -t floating=off; \
    bspc window -t fullscreen

The problem would then be toggling floating back on when fullscreen is disengaged. Would it make sense for the window manager to disregard the floating attribute of a window when fullscreen is toggled?

baskerville commented 9 years ago

The last issue should be solved in the window-states branch.

Please note that it did require some conceptual adjustments: now window states are really states and not flags (see the changes applied to bspwm.1.txt). The stacking order is as follow: tiled & pseudo-tiled < fullscreen < floating.

eigengrau commented 9 years ago

I’ve just upgraded to 54d9215, and recursive full-screening as described above works perfectly now. Thanks a lot! I think we’ve covered everything we brought up in here, and I haven’t noticed any further issues, so I’m closing this for now.

tom8347 commented 1 year ago

I had same panel-on-top-of-fullscreen-windows issue and the xdo above ... fix works, but it doesn't persist after my screen goes to sleep/times out and then comes back. Is there a way of making the fix persist?