bar icon indicating copy to clipboard operation
bar copied to clipboard

Allow for always-below

Open lf- opened this issue 6 years ago • 10 comments

Currently lemonbar always makes itself always on top, however that messes up with fullscreen windows since the bar is always above them. _NET_WM_STATE_BELOW looks like what is necessary to force the bar window to the bottom.

And this is not a WM issue. bar is an unmanaged window.

lf- avatar Aug 08 '17 05:08 lf-

I don't have that issue here with openbox.

Note: the issue comes up if I use the -d switch.

okraits avatar Aug 08 '17 11:08 okraits

    'lemonbar',
    '-fSource Sans Pro:size=11',
    '-fFontAwesome:size=11',
    '-gx20'

I don't believe that I'm using the -d switch.

lf- avatar Aug 17 '17 19:08 lf-

I didn't say that you use the -d switch, I just mentioned what I experienced.

okraits avatar Aug 24 '17 13:08 okraits

With unmanaged windows, it's irrelevant.

ThomasAdam avatar Sep 11 '17 15:09 ThomasAdam

Uhh, I think it's up to the WM to raise the fullscreen window to the top of the stack.

LemonBoy avatar Sep 11 '17 15:09 LemonBoy

I'd like to eliminate this script:

#!/bin/bash

until bar_id=$(xdo id -a aiopanel) ; do
    sleep 0.01
done

xdo below -t $(xdo id -n root) $bar_id

If the bar could do this itself, that would be awesome.

lf- avatar Sep 11 '17 16:09 lf-

Holy shit, that's horrid. Did you try changing this line instead of coming up with that monstrosity?

LemonBoy avatar Sep 11 '17 18:09 LemonBoy

Yes, I tried that before making a hack script. It didn't seem to change behavior.

lf- avatar Sep 11 '17 23:09 lf-

What about this patch:

diff --git a/lemonbar.c b/lemonbar.c
index 9220af0..d468dad 100644
--- a/lemonbar.c
+++ b/lemonbar.c
@@ -1210,6 +1210,8 @@ init (char *wm_name)
         // Some WM such as Openbox need this
         xcb_configure_window(c, mon->window, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y, (const uint32_t []){ mon->x, mon->y });
 
+        xcb_configure_window(c, mon->window, XCB_CONFIG_WINDOW_STACK_MODE, (const uint32_t []){ XCB_STACK_MODE_BELOW });
+
         // Set the WM_NAME atom to the user specified value
         if (wm_name)
             xcb_change_property(c, XCB_PROP_MODE_REPLACE, mon->window, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8 ,strlen(wm_name), wm_name);

LemonBoy avatar Sep 12 '17 06:09 LemonBoy

Applying the above patch worked perfectly for me. (i3-gaps, with the -d option) Edit: Sorry to necro.

ajstensland avatar Jan 20 '19 05:01 ajstensland