Re: Gtk+ Modality Problem



I did some experiments with gdk_window_add_filter. First of all there
is a GdkWindow associated with every GtkWidget. It can be acquired
either by ->window or using gtk_widget_get_parent_window. Then is it
not so hard to add an event filter to any particular widget - in my
case to the parent window. The filter is, in reality, a function which
takes a GdkXEvent and should either translate the message manually to
a GdkEvent, or leave the system continue (default translation), or
drop it on the floor. First thing I tried is to drop everything on the
floor and this made my application "not responding a couple of times".
Then I got a printout of the events and after some trying I realised
that if I filter event of type 33 (not sure what this means in X
style) the WM considers the application "not responding". Even when I
filtered everything except type 33, no further modality was achieved.
The only explanation I have is that the respective resize, move, etc
events are handled on a lower level than Gtk i.e. WM or even X11.
Therefore no matter what I do with the events from Gtk, I cannot
modify this default behaviour. Even further, this kind of work starts
going to specific with respect to platform, display server and window
manager - and I would definitely like to avoid that. I guess I will
have to leave the issue as it is and go on with my work.

Atanas



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]