Hi all,
I’m working on a gtk application that I want to use in fvwm, but I’m running into a few fvwm specific problems. Hopefully my descriptions make sense, if not just ask for clarification.
- When I mouse over a specific widget in my application I want to display a new window and when I leave the widget I want to window to disappear. I am doing this via gtk enter/leave notify events. The code looks something like this:
[code]on_enter_notify_event()
{
gtk_widget_show (mywidget->window);
}
on_leave_notify_event()
{
gtk_widget_hide (mywidget->window);
}
[/code]
The problem is that fvwm seems to quickly switch focus to the new window and back, thus causing the sequence of events to be:
enter_notify_event
leave_notify_event
enter_notify_event
each time my mouse pointer enters the window. (Note: it should just execute the enter_notify event).
I have tested this in KDE, and it works properly (executing the enter_notify_event once when the mouse enters the widget and the leave event when the mouse leaves the widget).
I was assuming that Fvwm was grabbing focus somehow, so I tried to append some useful looking options to the style of the app, but this didn’t help. This is the style of the popup window I currently have in my .fvwm2rc:
Style popup_window NoTitle, WindowListSkip, CirculateSkip, NeverFocus, StaysOnTop, NoHandles, GrabFocusOff, StartsRaised, NoPPosition
Obviously this is not working or I wouldn’t be posting. Is there any way I can prevent Fvwm from stealing focus from the main window for the app?
- The popup window I described in #1 also should be displayed at a specific position that the application defines. Fvwm seems to want to place it elsewhere. Is there a way to set fvwm to use the application position settings instead of its own?
I’m setting the window position in my app via:
gtk_widget_set_uposition( widget->window, x, y );