GTK windows losing their State on restart

Hi everyone. In order to be able to switch between windows with/without a title bar I use the State function of Fvwm. All windows start without a title bar, and when I use my shortcut to toggle the title bar it also toggles the State 1 of the window.

Therefore, when I restart Fvwm I reapply the Title style to all the windows with State 1. This works fine with every windows I tested, except for Firefox, Thunderbird and Acroread (and possibly other gtk applications) who seem to reset all there State attributes upon restart.

Does anyone have any idea why? It’s not very important for me to correct this small bug, but I would love to understand what is happening…

Yes. When you restart FVWM, it will write out a file describing window state information. During a recpature (which happens when FVWM has just begun restarting again, to rearrange its windows), this file is consulted to put the window in the correct layer again, etc.

Unfortunately, it’s also read by session managers, and those expect certain attributes describing the window – which these GTK apps you describe do not have. But we’re talking deprecated XAtoms. In your case, the WM_COMMAND Atom which was always an ugly hack, to recreate the program as it was invoked.

I’ve just fixed this in CVS.

– Thomas Adam

See: github.com/ThomasAdam/fvwm/comm … d460925d10

– Thomas Adam

Wow, I’m impressed! This works perfectly, just patched my fvwm and eveything is fine now. I sure did not expect a patch to fvwm for this!

That’s one of the things that is great about fvwm (appart from it being the best WM out there), you really have quality support.

Thanks a thousand times.

Well, it was a bug, so it needed to be fixed, and it was easy.

– Thomas Adam