Re: [gtk-list] Some slowdowns...




> I don't know if I'm alone, but I often get MOTION_NOTIFY problems with gtk.
> (Not really problems actually: the events seem to follow exactly the motion of the mouse, even if 
> the redraw is slow. The consequence of this being the fact that the actual motion 
> seems to record the mouse path, and follow it much slower...)
>
> The most obvious example is the "handle_box"  (but maybe this is a problem
> with the window manager (FVWM 1 or maybe 2), but when the box is floating,
> this is nearly unusable...

Your only unique in having a slower machine then other people ;-)
I can see the behavior if using my graphics tablet, which sends
a lot more motion events. But:

> !           ((event->type == GDK_MOTION_NOTIFY) &&
> !           (next_event->type == GDK_MOTION_NOTIFY))) &&
> !           
>             (next_event->any.window == event->any.window))
>           {
>             tmp_list = current_events;

Is _not_ the right way to fix things. (For drawing programs, you
sometimes really do want all motion events)

The right way to solve this problem is to specify 
GDK_POINTER_MOTION_HINT to gtk_widget_set_events, which says
"don't send me another event until I ask for it), and then
if event->is_hint is set, use 

  gtk_window_get_pointer

to get the current pointer position and ask for a new motion
event.

This needs to be done for gtkhandlebox.c and for the shaped
window examples.

Regards,
                                        Owen



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