Communication between FVWM and my App.

Hi All!

I would like to link an action of my application to an fvwm event (the action should be
accessible through minimize button). For this purpose, my application process event.
When the minimize event is received by my application, the action is done.

The remaining probleme is my application is minimized (I can resize it after). If I
suppress the minimize action in the configuration file, obviously, the event is not sent
anymore.

Is there a way to send a customized event to my application ? This would be an
x11event (XClientMessage ???) this event will be sent from fvwm to the xserver then
from the xserver to the application. The event will be received by my application and
the action performed.

(I arrived to this with the following supposition:
I’ve supposed that fvwm send information to the xserver to minimize the application
then I don’t know if the xserver send on its own the minimized event to the application
or if fvwm send to the xserver a message. This message would be forwarded to the
application by the xserver.)

If my explanations are not clear enough, ask any questions,
Thanks !
ngeo.

Right – there’s a few ways you can achieve that.

I don’t understand what you mean by this – can you be more specific?

No – events are not sent, they’re generated. It will be the job of the XServer to detect them. Event propogation happens thus:

Xserver → WM → (application)

You can catch events with FvwmEvent, or handle them within your application, if it happens within the application’s context.

You want your application to react to a minimise event? If that’s so, use FvwmEvent to pass whatever is needed to your application. If I am to help you further, you are going to have to be more specific.

– Thomas Adam

The action I do on minimize has nothing to do with minimize it change
the application behavior. I use minimized because I don’t need to
minimize my window and the minimize event is very particular so I am
sure the user wants to apply this action and not another. The workaround
for now is that I restore the window to normal just after minimze
event and then apply my process.

Sure! Any help is welcome :slight_smile:
First the context: I have to export the display of my application. So
the window manager and the application are not on the same PC. The
application is already quite heavy so I would prefer to send back event
with the xserver and not create a new network connection.

My application has to receive a particular event which would be
“generated by the window manager” (after an action on a window
manager decoration). But fvwm does not need to do anything
except to “inform the application” (this through the xserver) of
this event.

Hope this is more clear but I’m not sure :confused:
You can use private mail if you prefer (I think you have access to mine).

ngeo.