Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for always-below #204

Open
lf- opened this issue Aug 8, 2017 · 10 comments
Open

Allow for always-below #204

lf- opened this issue Aug 8, 2017 · 10 comments

Comments

@lf-
Copy link

lf- commented Aug 8, 2017

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.

@okraits
Copy link

okraits commented Aug 8, 2017

I don't have that issue here with openbox.

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

@lf-
Copy link
Author

lf- commented Aug 17, 2017

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

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

@okraits
Copy link

okraits commented Aug 24, 2017

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

@ThomasAdam
Copy link

With unmanaged windows, it's irrelevant.

@LemonBoy
Copy link
Owner

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

@lf-
Copy link
Author

lf- commented Sep 11, 2017

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.

@LemonBoy
Copy link
Owner

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

@lf-
Copy link
Author

lf- commented Sep 11, 2017

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

@LemonBoy
Copy link
Owner

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);

@ajstensland
Copy link

ajstensland commented Jan 20, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants