Some slowdowns...




        Hi!

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...


I tried to fix this with the following patch:

*** gtkmain.c.old       Mon Jan 26 00:54:06 1998
--- gtkmain.c   Mon Jan 26 01:26:09 1998
***************
*** 313,324 ****
         *  which contained the mouse initially and highlight the
         *  widget which ends up containing the mouse.
         */
        if (next_event)
!       if (((event->type == GDK_ENTER_NOTIFY) ||
             (event->type == GDK_LEAVE_NOTIFY)) &&
            ((next_event->type == GDK_ENTER_NOTIFY) ||
             (next_event->type == GDK_LEAVE_NOTIFY)) &&
!           (next_event->type != event->type) &&
            (next_event->any.window == event->any.window))
          {
            tmp_list = current_events;
--- 313,333 ----
         *  which contained the mouse initially and highlight the
         *  widget which ends up containing the mouse.
         */
+ 
+       /* All the same with motion notify. If the redraw is slow,
+        * we don't follow exactly the mouse path, 
+        * but we take the shortest way to its last position... 
+        */ 
        if (next_event)
!       if (((((event->type == GDK_ENTER_NOTIFY) ||
             (event->type == GDK_LEAVE_NOTIFY)) &&
            ((next_event->type == GDK_ENTER_NOTIFY) ||
             (next_event->type == GDK_LEAVE_NOTIFY)) &&
!           (next_event->type != event->type)) ||
!           
!           ((event->type == GDK_MOTION_NOTIFY) &&
!           (next_event->type == GDK_MOTION_NOTIFY))) &&
!           
            (next_event->any.window == event->any.window))
          {
            tmp_list = current_events;

(against 0.99.3)

but if it get things better (for shaped windows without decorations, for example)
it doesn't solve the problem.


Any ideas?


        Bye,

                Cavier



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