bbidulock / icewm

A window manager designed for speed, usability, and consistency
Other
577 stars 98 forks source link

desktopbackground transparency below another window #627

Closed zaza42 closed 2 years ago

zaza42 commented 2 years ago

This bug was introduced in version 2.8. I'm using glava in a total transparent window. It has no problems in v2.7 and below, but in 2.8 and 2.9.x.

So if something was on the screen before i start glava then it shows up instead of the background. For example a terminal window: icewm-29-glava-transparent or lemmings (xpenguins theme) - the lemmings are frozen in this area, not animating anymore: icewm-29-glava-transparent-szarlemming

With v2.7 I have no bug: icewm-26-glava-transparent-jo

I start glava with command: icewmhint GLava layer Below ; glava

if nothing is on top of glava's place then there is no glitch, of course, because the background freezes and this is what I expect.

gijsbers commented 2 years ago

So you run some compositor? Which? What is your Alpha setting? Does it matter if you switch compositor? Sofar I can't reproduce. It just works as you describe for 2.7.0. What it shows is strange. It has some symmetry, but if Charles Mingus soloes mainly the middle of the window responds.

zaza42 commented 2 years ago

I don't use any compositor just pure IceWM. Here you are a little demonstration video with icewm 2.9.2.

https://user-images.githubusercontent.com/16356124/145262963-40b310c5-c935-4009-ac9a-2ada703f90bb.mp4

gijsbers commented 2 years ago

You still haven't told us your Alpha setting. Why do I need to pull relevant info from you? Without running a decent compositor, it seems coincidental that you get transparency. I just tried it with 2.3.0 and 2.7.0 and I never get transparency with glava without running a compositor. Maybe you have some special settings?

gijsbers commented 2 years ago

Check your rc.glsl on the value of setopacity. Here in"/etc/xdg/glava/rc.glsl". If you don't want to run a compositor, then use #request setopacity "xroot". That should be independent of the window manager.

zaza42 commented 2 years ago

Sorry, I don't know where do I look for Alpha setting - I've never set such a thing. Yes, I have #request setopacity "xroot" in .config/glava/rc.glsl.

zaza42 commented 2 years ago

The exactly same settings, just replaced icewm 2.9.2 with 2.7.0.

https://user-images.githubusercontent.com/16356124/145271128-da742554-1efd-4494-90a2-fe5268f9d464.mp4

gijsbers commented 2 years ago

icewm -p | grep Alpha.

From your last video I deduce that with 2.9.2 everything works perfectly again?

But you do have special winoptions to make glava borderless?

If you have setopacity "xroot" then it should no longer be under the influence of icewm. Then it is between glava and the X server.

I recommend you set Alpha=1 and run a compositor. Compton in the standard setting suffices. Then you can run glava with #request setopacity "native". Much more reliable.

zaza42 commented 2 years ago
$ icewm -p | grep Alpha
Alpha=0
IceWM: A window manager is already running, use --replace to replace it

No, my last video made with IceWM 2.7.0 as you can see in top left terminal window. So the only difference between the 2 videos is the version of icewm. Everything else is the exactly same.

I've never ever used a compositor, but I'll look around.

gijsbers commented 2 years ago

Maybe this is not an icewm problem, but icewmbg. Could you verify that assumption. My best guess is commit 6d2a99f26700962bb234594140e167f24e72bd27, which releases the background pixmap handle.

zaza42 commented 2 years ago

Ohh, I forgot to mention that I use xev to set the wallpaper, which is not a background process, just sets an image in xorg then exits. feh --no-fehbg --bg-scale /usr/share/wallpapers/debian/debian-blue.png

gijsbers commented 2 years ago

xev? That feh command appears to be good. I also checked icewmbg and it seems correct too. My current understanding of this issue is that icewm is not responsible.

DarkSamus669 commented 2 years ago

The exactly same settings, just replaced icewm 2.9.2 with 2.7.0.

screencast-2021-12-08_20.23.54.mp4

Is it conky? on the right??

zaza42 commented 2 years ago

The exactly same settings, just replaced icewm 2.9.2 with 2.7.0. screencast-2021-12-08_20.23.54.mp4

Is it conky? on the right??

No, it's the good old gkrellm.

DarkSamus669 commented 2 years ago

The exactly same settings, just replaced icewm 2.9.2 with 2.7.0. screencast-2021-12-08_20.23.54.mp4

Is it conky? on the right??

No, it's the good old gkrellm.

it's really nice.

zaza42 commented 2 years ago

xev? That feh command appears to be good. I also checked icewmbg and it seems correct too. My current understanding of this issue is that icewm is not responsible.

Sorry, it was a typo.I meant feh, of course.

And the latest git version seems to have fixed this bug, too.

gijsbers commented 2 years ago

No code change was made for this issue. There was no bug in icewm as icewm was not involved in what was going on and hence nothing needed to be fixed in icewm.

zaza42 commented 2 years ago

OK, I've finally found it!!!

If I run feh --no-fehbg --bg-scale /usr/share/wallpapers/debian/debian-blue.png twice at the beginning of ~/.icewm/startup then I can't reproduce this bug anymore! So this may be an xorg or feh bug - sorry for bothering you! (But for some strange reason this did not happen with older IceWM versions.)

…aaaaand: I got the idea and… if I run feh right after creating transparent borderless rxvt terminal windows, it eliminates the wrong background transparency bug which I reported in https://github.com/bbidulock/icewm/issues/492 !!!

gijsbers commented 2 years ago

So it is a feh bug or a glava bug? Or maybe an X server bug. You need to understand what happens with X root desktop backgrounds. feh sets two properties. Run: xprop -root | grep PMAP which is done in feh-3.7.2/src/wallpaper.c by the function feh_wm_set_bg.

Now when you run glava with setopacity set to "xroot", then you will see in glava/glava/xwin.c that it obtains a reference to this pixmap property in the function get_drawable, which is used by xwin_copyglbg.

This means that glava reads from a pixmap, which was defined by feh. icewm never examines or uses that pixmap. So the whole idea behind the desktop background settings is totally unrelated and irrelevant to whatever icewm does. Will you now report the bug to the proper authorities?

zaza42 commented 2 years ago

Ok, I will, just do a bit more research to get closer the problem.

(Other user with an almost empty configuration file does the same bug, but feh sets the background in a totally glitched way. :-? On another machine I've set up a Debian Stable (Bullseye) with custom compiled IceWM package, and I can't get transparency without setting SupportSemitransparency=1. For the first time, I would like to reproduce this bug in a clean environment, than I have accumulated for years on my own desktop. Secondly: I can't successfully compile & run the latest glava git, I use a 2 year old version.:-< )

gijsbers commented 2 years ago

SupportSemitransparency is for icewmbg and its default is 1. If you observe the aforementioned PMAPs you know why. You need to study yourself more if you want to understand and not depend on me so much.

gijsbers commented 2 years ago

It seems that with feh persistent background pixmaps (when feh has exited, but its pixmaps have been marked as persistent resources) the X server forgets to refresh the background when icewm reparents a client window to a frame. I have added this workaround, but it would be better if this was fixed in X.