Tomas-M / xlunch

Graphical app launcher for X with minimal dependencies
http://xlunch.org
GNU General Public License v3.0
219 stars 37 forks source link

Compositor issues #53

Closed Tomas-M closed 6 years ago

Tomas-M commented 6 years ago

I am trying to use xlunch with compositor (compton). I enable fading, so when xlunch starts, it fades in nicely. This effect works fine. I would expect the fade-out (when xlunch ends) in opposite direction, but something else happens - it flashes to white, as like the entire fullscreen window was white, and then fades back to the desktop.

@PMunch I noticed that you mentioned using compositor in documentation, so you probably have some experience with it, did you try to enable fading? Does it work for you normally? Or does it flash on exit? Thank you

Tomas-M commented 6 years ago

Video with demo Debian live test.zip

Tomas-M commented 6 years ago

When trying xcompmgr, it prints very much error messages on xlunch close, the messages are like this:

error 140: BadRegion request 138 minor 14 serial 6234 error 140: BadRegion request 138 minor 14 serial 6288 error 140: BadRegion request 138 minor 14 serial 6342 error 140: BadRegion request 138 minor 14 serial 6386 error 140: BadRegion request 138 minor 14 serial 6431 error 140: BadRegion request 138 minor 14 serial 6476

... etc. hundreds of lines. Is it possible we are missing something in xlunch, to properly terminate it?

PMunch commented 6 years ago

Hmm, I'm running compton myself with fading enabled. To exaggerate the effect I turned the fade-step down to 0.01 and while in full-screen mode it fades just fine. When it's in windowed mode it fades in but then just disappears instead of fading out.

I had a look at the cleanup procedure and can't immediately see anything that should cause this. You might try to comment out the XFlush command on line 369, but for me this did nothing (however I didn't have your issue to begin with so who knows).

Tomas-M commented 6 years ago

If I use blackbox, it fades in and out without any issue. So again, a problem in FluxBox only. Grrr I hate this :) Unfortunately I have to use fluxbox.

Tomas-M commented 6 years ago

OK, was able to solve this by fluxbox settings. I promise I will no longer report problems which are only fluxbox related :-) Closing.

PMunch commented 6 years ago

Haha, no worries. If anyone else comes looking for a solution for this, what were the settings you needed to change?

Tomas-M commented 6 years ago

The problem was caused by the way how wallpaper was set. I had an .xinitrc file, which set root window's wallpaper by calling 'feh' and then started fluxbox by calling 'startluxbox'. It worked but fluxbox was probably confused by this (it probably didn't know that there is a wallpaper on root window, it mayby considered the screen white-empty and for that reason it filled all closing windows with solid white color, or I don't know, this is just my guess).

Anyway, I've removed the setter command from .xinitrc, and instead I modified my fluxbox style file to include these two lines:

background: fullscreen
background.pixmap: /usr/share/wallpapers/wp.jpg

Now fluxbox knows there is a wallpaper on the root window, it calls fbsetbg script to set it with some arguments (it uses feh anyway), and it has no more problems with fading out windows, everything is super smooth now, no flashing at all.

PMunch commented 6 years ago

Aaah, that actually makes a little sense. Glad you figured it out.

Tomas-M commented 6 years ago

The current version seems stable enough to me, can we tag this as a new release?

PMunch commented 6 years ago

Yeah, that's probably a good idea.

Tomas-M commented 6 years ago

When trying on different computers it sometimes made the same problem with fading out using compton. After reading compton man page, I noticed option --no-fading-destroyed-argb. Man page says:

 --no-fading-destroyed-argb
       Do not fade destroyed ARGB windows with WM frame. Workaround of
       bugs in Openbox, Fluxbox, etc.

I am not sure what is "destroyed argb", but most likely fluxbox does this destroying of argb, and compton can be set to not fade out in that case. Other fadeout works fine (eg. ending xterm). So to completely solve the issue I need to use this argument for starting compton. With the argument, it simply closes the xlunch without shading.