I have found that FVWM is AMAZING – does everything that I want… so far.
So, far all you guru’s, here’s something that just came to mind (and something that I need FVWM to do):
Is it possible, in the .fvwm2rc, to specify that when application X on Desk Y is active/started/whatever, that no tabbing, switching, anything is possible as long as that application is active?
I have been scouring the fvwm man page, and I can’t find anything.
I sincerely do not want to have to change anything in events.c or session.c, etc. stating that if the window root is Desk Y with application X active, dont’ allow anything else to gain focus as long as that window has focus
If anyone out there knows a way that something like this could possibly gtake place – PLEASE drop me a reply
It is, yes. Let’s assume that you have application “X”. You can use FvwmEvent to monitor all windows as they are started up. That’s the first step. We’ll call the FvwmEvent instance “FE-notab”:
DestroyModuleConfig FE-notab: *
*FE-notab: Cmd Function
*FE-notab: add_window SomeFunc
# Start the module next time fvwm reloads.
AddToFunc StartFunction I Module FvwmEvent FE-notab
So everytime a window is mapped to the Xserver, the function “SomeFunc” will get run. Now, all we have to do is test for this application X and “disable” scrolling:
+ I All (CurrentDesk) ThisWindow ("X") DisableScroll
Which means that if the window called “X” exists, then the “DisableScroll” function will get called. In that, we can then do something like:
+ I EdgeResistance 10000 10000
+ I EdgeScroll 0 0
+ I DestroyFunc foo
That’ll stop you from flipping pages with the mouse (if the mouse hits the edge of the screen.) The “DestroyFunc foo” part is for destroying those functions you might have that are bound to key-bindings that flip pages. You can’t completely disable the effect of flipping pages/desks, so the next best thing is to disable the means to do so – which means removing the ability to do so via key-bindings, etc.
Of course, what happens, when you then do kill the application that was stopping you from flipping pages. You’d then have allow it, hence you’ll need to add to the “FE-notab” configuration, to watch for an event on close/destroy window:
*FE-notab: destroy_window RestoreFlipping
Then the function:
+ I EdgeScroll 100 100
+ I EdgeResistance ...
etc, etc. But that might be long-winded. The other possible action I can see instead of that, is to listen for “new_desk” events instead, and effectively “disallow” them. Note that what follows is to be used instead of the method suggested above, but not as well as: