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

Bug#55799: penguineyes: erratic movement when dragging

Package: penguineyes
Version: 0.9-2

On my slow old SVGA and with the fvwm window manager I find that when
dragging the penguineyes window around the screen it jumps about,
going sideways away from the path of the drag, or forward and
backward.  With lwm the effect is worse, with no window manager it
doesn't occur.

I think what's going on is that in penguineyes.c the
gdk_window_set_position() in motion_notify() goes to the window
manager via substructure redirection and the window manager doesn't
always have time to do the actual XMoveWindow() before the next
motion_notify() tries to read the position with
gdk_window_get_position().  Very likely my slow video card is delaying
the server and exacerbating the problem, it might not show up on a
fast video.

If penguineyes is going to do it's own window positioning then it
should set override_redirect to tell the window manager to keep it's
hands off.  Using GTK_WINDOW_POPUP for the top level window achieves
this, though maybe there's a better way.

--- penguineyes.c.old	Thu Jan 20 15:16:25 2000
+++ penguineyes.c	Thu Jan 20 17:53:31 2000
@@ -470,7 +470,10 @@
 	mainWindow = applet_widget_new("penguineyes");
-	mainWindow = gtk_window_new( GTK_WINDOW_TOPLEVEL );
+	/* The get/set window positions in motion_notify() don't work well
+           if the window manager is doing substructure redirection.  Using
+           GTK_WINDOW_POPUP sets override_redirect and avoids this.  */
+	mainWindow = gtk_window_new( GTK_WINDOW_POPUP );

Reply to: