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

"desktop" attribute not present on i3-gaps #6

Closed
Longhinus opened this issue Jan 16, 2018 · 18 comments
Closed

"desktop" attribute not present on i3-gaps #6

Longhinus opened this issue Jan 16, 2018 · 18 comments

Comments

@Longhinus
Copy link

The desktop attribute is not available on i3-gaps (at least since the last gaps-next version).

If you could add a way to dispaly the visualizer in background instead of over other windows. Because i3 floating window must be ontop of tiling ones. On the official wiki it is say that the desktop attribute (to display a window beneath others) is not implemented in i3, thanks.

@jarcode-foss
Copy link
Owner

jarcode-foss commented Jan 16, 2018

On the official wiki it is say that the desktop attribute (to display a window beneath others) is not implemented in i3, thanks.

Unfortunately this is something the window manager itself needs to implement, as GLava itself has no (actual) control over where the window is positioned. There are other ways you can try to get GLava embedded in your desktop, however:

  • Using #request setxwintype "dock" or a similar window type that has unique behaviour under i3.

  • Adding #request addxwinstate <value> requests, where <value> can be "modal", "sticky", "skip_taskbar", "skip_pager", "above", "below", or "focused" (and other unrelated options for embedding). You can use multiple addxwinstate lines.

Try #request addxwinstate "below" and use setxwintype with a window type that i3 doesn't tile normally (ie. it can just be positioned anywhere) should work. Otherwise, you will need custom rules in your i3 config for GLava.

If you find a combination of addxwinstate and setxwintype lines gets GLava in your desktop and fixes your issue, please respond with them since I am planning to implement a single option to handle all the WM-specific issues and do this behind the scenes.

@Longhinus
Copy link
Author

Than for the rep, actually in i3, a non-tiling window must be on top of tiling ones. Which makes it impossible. I think I may find an answer modifying my i3 config.

@jarcode-foss
Copy link
Owner

It also seems i3 has an IPC interface: https://i3wm.org/docs/ipc

I can probably use this to get GLava embedded in the desktop of i3 without requiring the user to modify their config, but I will need to research a bit about i3 since I have not used it myself.

If you do find an answer by modifying your config, please post your changes so that other users may see it.

@pasimko
Copy link

pasimko commented Feb 5, 2018

How does conky do it?

@jarcode-foss
Copy link
Owner

@pasimko Conky draws to the root X11 window instead of creating its own. GLava creates its own window since it needs to also create its own OpenGL context. There may be some hacky way I can create a GLX context for the root X11 window, but I will have to ditch glfw's window creation code in order to do so.

@jarcode-foss
Copy link
Owner

Depending on how the issue referenced above is responded to, I may attempt to implement some workaround trying to create a GLX context on the root window, now that I have separate window creation backends.

@jarcode-foss
Copy link
Owner

jarcode-foss commented Mar 4, 2018

Update: I tried to implement instantiating a GLX context on the root window. It did not work -- I was able to create the context and use it, but was not able to display anything. The only other application I can find that has attempted something similar is xscreensaver's -root option, which also does not work.

The only alternative here is to create an indirect GLX context and copy the results to the root window via traditional X11 drawing, which would be incredibly slow, even with using XShm.

The only practical solution to this issue is for the i3 developers to properly respect desktop windows -- this issue really isn't my responsibility, so I'm closing it.

edit: see unmanaged windows

@mmhobi7
Copy link
Contributor

mmhobi7 commented Mar 4, 2018

I think I recall it being possible through the i3 config, ill look into it later today

@jarcode-foss
Copy link
Owner

@aaahh if you do find a solution via configuring i3, please share it.

@mmhobi7
Copy link
Contributor

mmhobi7 commented Mar 11, 2018

I failed to find it, it was on https://www.reddit.com/r/unixporn/

@jarcode-foss
Copy link
Owner

This problem may be fixed by using the new #request setxwintype "!-", see the above reference. In short, '!' causes the window to bypass the window manager (override_redirect / CWOverrideRedirect), and '-' stacks the window below everything else (XLowerWindow).

@jarcode-foss
Copy link
Owner

@Longhinus if you could test the results, that would be helpful.

@xg-teodor
Copy link

Hey @wacossusca34, thanks for your work on this!

I've tested the latest git version with i3 and it works fine with #request setxwintype "!-".

@jarcode-foss
Copy link
Owner

@xg-teodor awesome! I wish I could have come up with the idea sooner, although it is a bit of a hack.

@Seltyk
Copy link

Seltyk commented Oct 24, 2018

I tried this and it works and all, but the xwinstate fullscreen request doesn't work

@mmhobi
Copy link

mmhobi commented Oct 24, 2018

Quick fix is to manually set full screen when this condition happens by taking motior/workspace size and setting it as window size and 00 position

Edit: I’m @aaahh this was temp account

@jarcode-foss
Copy link
Owner

@wundrweapon as @strongeggs mentioned, you will have to position the window yourself. rc.glsl explicitly states that setxwinstate does not work with unmanaged window types:

/*
   ...
   
   Alternatively, you can set this value to "!", which will cause
   the window to be unmanaged. If this is set, then `addxwinstate`
   will do nothing, but you can use "!+" and "!-" to stack on top
   or below other windows.
*/

@LeelaPakanati
Copy link

I'm trying to run this on i3-gaps but when I set "!-" on as the xwintype, it just doesn't show up anywhere. The program seems to run (I get the fps updates on the terminal) but nothing shows up.

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

8 participants