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

herbstluftwm compatibility #17

Closed
satyarth opened this issue Feb 7, 2018 · 4 comments
Closed

herbstluftwm compatibility #17

satyarth opened this issue Feb 7, 2018 · 4 comments
Assignees
Milestone

Comments

@satyarth
Copy link

satyarth commented Feb 7, 2018

Hi, first off- great job! GLava looks really cool, and I'll definitely use it once I get it working with my window manager.

So, I have a line in my herbstluftwm config which unmanages windows of type desktop, dock and notification:

hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off

This works fine for programs like dunst or docky, but doesn't seem to work for GLava when I set the window type via rc.glsl. I'm doing it like so:

#request setxwintype "desktop"

I tried all three window types mentioned above, but hlwm doesn't seem to unmanage them. I checked that the window type is being set correctly with xprop (output below):

WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
_NET_FRAME_EXTENTS(CARDINAL) = 2, 2, 2, 2
_NET_WM_STATE(ATOM) = _NET_WM_STATE_BELOW
_NET_WM_DESKTOP(CARDINAL) = 1
_NET_WM_ICON_NAME(UTF8_STRING) = "GLava"
_NET_WM_NAME(UTF8_STRING) = "GLava"
WM_LOCALE_NAME(STRING) = "C"
WM_CLIENT_MACHINE(STRING) = "burek"
WM_ICON_NAME(STRING) = "GLava"
WM_NAME(STRING) = "GLava"
XdndAware(ATOM) = BITMAP
WM_CLASS(STRING) = "GLava", "GLava"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		program specified location: 0, 0
		window gravity: Static
WM_HINTS(WM_HINTS):
		Initial state is Normal State.
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_PID(CARDINAL) = 14756
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x139dafa0, 0x0, 0x139c6e40, 0xc8bc0200

I then tried unmanaging it by WM_CLASS in my hlwm config:

hc rule class~'GLava' manage=off

This unmanages it fine, but GLava gets drawn on top of my other windows, which isn't very useful. If I could get it to draw in the background, I'd be able to use it. As far as I can tell the only way to have it drawn below other windows in hlwm is to set the window type to DESKTOP, but as mentioned above hlwm doesn't want to play nice. I'm not sure whose end the problem is on, but thought I'd make an issue anyway.

Thanks!

@jarcode-foss
Copy link
Owner

So, I have a line in my herbstluftwm config which unmanages windows of type desktop, dock and notification:

hc rule windowtype~'NET_WM_WINDOW_TYPE(NOTIFICATION|DOCK|DESKTOP)' manage=off

This works fine for programs like dunst or docky, but doesn't seem to work for GLava when I set the window type via rc.glsl

Perhaps this has something to do with when GLava sets _NET_WM_WINDOW_TYPE? I actually have a similar issue in AwesomeWM where it does not respond to GLava's window type until it re-manages the window (thus re-reading the property).

The rest of your issue description suggests the WM actually only reads the _NET_WM_WINDOW_TYPE atom once (on when it manages the window), which leads me to believe the similar bug I have enountered on AwesomeWM is due to the same reason -- I might be able to look around for a way to intialize the window with these properties set, but I also have GLFW's window abstractions to work around.

I'm not sure whose end the problem is on, but thought I'd make an issue anyway.

It's definately a bug in GLava. Your issue description helped a lot.

@jarcode-foss
Copy link
Owner

Turns out I was right! The previous commit didn't fix it, though, it seems I need to set the atom immediately after XCreateWindow is called (or glfwCreateWindow). It's just a bit awkward to do so since the .glsl files loaded for config (preprocessing, technically) need an OpenGL context since they are technically shaders.

@satyarth thanks for this bug report. GLava actually works on my own WM now! I will have this fixed in unstable today, and for 1.3.

@satyarth
Copy link
Author

satyarth commented Feb 9, 2018

Thanks for the quick fix! Been testing for a day, works fine so far.

@jarcode-foss
Copy link
Owner

@satyarth since I added support for GLava's own unmanaged windows, I am curious if #request setxwintype "!-" achieves the same effect -- I could use that by default for the --desktop flag on herbstluftwm to make configuration a little easier.

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

No branches or pull requests

2 participants