I have an advanced GUI application which i want to run on Fvwm. I have set the application window property to have the window without any Window title and window frame. When i run my application in GNOME, KDE or MWM, the application is displayed properly without any frame and window frame or resize handles but when i run the same application in Fvwm, the application is displayed with the default Fvwm window title and frame.
Now i think i have to first check in my code that “if Fvwm is running, then set the window decoration hints appropriately”. Now my queries are:
How to detect using C Code that Fvwm is running? (In my code, i detect Mwm by checking the “_MOTIF_WM_INFO” property)
How to set-up window decoration hints for Fvwm?
I am new to Fvwm, so please help me!!!
Thanks in advance!!!
[color=red]Edited by theBlackDragon:
I can barely follow this, guess it doesn’t really belong in basic questinos then
–> Moved from Basic questions[/color]
FVWM doesn’t define (AFAIK) an XAtom to denote itself in that way – this is because applications don’t need to bother detecting it. The only reason MWM does this is for legacy purposes and most likely because its embedded upon its own toolkit.
That’s not something you do programatically – again, because the window is reparented into a frame of its own (see add_window.c in the FVWM source) it’s down to the user to decide if/when such things are visible.
I tried the above option in the system.fvwm2rc file. While the option worked with native X applications like “xcalc”, it didn’t work with my application even when my application is in the the correct path. I even pasted the full path of the executable. I tried the regular expression “*” which worked, but this affected all the applications open in Fvwm.
How can i specify a particular application in the Style option?
My application also supports Mwm, GNOME, KDE etc. The user can specify various characteristics of our application like Window title, frame, resize handles, window mode (modal/non-modal) etc. In case of Mwm or other window managers, we detect which window manager is running and then we set the appropriate window decoration hints using “XChangeProperty” X11 API.
Now, I want to achieve the same functionality in Fvwm i.e. detect if Fvwm is running and then set the various hints based on the options specified by the user. So, basically we want the window decoration code to be controlled by our application instead of being specified by the end-user using “Style” Fvwm property in system.fvwm2rc.
Kindly, help me in getting started with the above…
You have to use the window Class, Resource or Name specified by the application to X.
There is no real way of doing this, since everything can be overridden by applications. To only way to have full control over fvwm is though the config files or a module. You may however detect fvwm by checking the Name or class of the window referred to by the _NET_SUPPORTING_WM_CHECK property on the root window.
Actually, applications set that XAtom themselves – and the window manager then decides whether or not it will react to it. Of course, this is really only applicable for Motif apps – it’s quite rare that this option will be any good for applications written this side of the 21st century.