WindowStyle visual glitch

Hi everyone! I have a problem with WindowStyle. I’ll try to explain… I’ve set thumbnails when a window gets the action “Iconify” and everything works.
After I wanted to have thumbnails on the WindowList (Alt+Tab), so I managed to get a screenshot of the window when it gets focus, composite it with the Icon associated and set this new image as MiniIcon of the current window. This works, WindowList has now a nice window preview… The problem is a strange “visual glitch”. This is the less complex code I can write to reproduce the bug:

Function that gives every window the same miniicon

[code]DestroyFunc GenerateMiniIcon
AddToFunc GenerateMiniIcon

  • PipeRead “echo WindowStyle EWMHMiniIconOverride, MiniIcon /home/guest/.fvwm/miniicon.fixed.png”[/code]

Event focus_change

DestroyModuleConfig FvwmEvent: * *FvwmEvent: Cmd function *FvwmEvent: focus_change GenerateMiniIcon

Start function

[code]DestroyFunc StartFunction
AddToFunc StartFunction

  • I Module FvwmEvent

This is quite simple, I hook a focus_change event, so when the focus changes, the system set a new Miniicon for the focused window to a fixed png (for simplicity). The problem is that with GTK applications (firefox, nautilus, etc.), if I have a text selection before the focus, I see it flashing for about half a second when the WindowStyle executes. I thought it was the xwd taking the screenshot, later I realized it is “WindowStyle EWMHMiniIconOverride, MiniIcon …”.

Before the click

After the click, here I see the text selected flashing:

I know it’s not a big problem, but I use many GTK applications, and after hours of use, it become really boring and frustrating.

More info about the bug:

Reproducible: Always
System: Gentoo Base System release 2.0.1, kernel 2.6.31-gentoo-r6
FVWM version: x11-wm/fvwm-2.5.28 (last stable on gentoo)
XORG: x11-base/xorg-server-1.7.7-r1

Thank you for your help


The window is recaptured, so yes, it’s always going to do that.

Solution: don’t do it when the blasted window receives focus.

– Thomas Adam

Thank you for your reply! Yes I also thought about this possibility, but I don’t know when to do it to keep the WindowList updated: if the window doesn’t have focus and I use xvd or thumbs.c, the output thumbnail has black areas of the others windows on top :frowning:

Something like this: