changeset 3450:24f190625644 trunk

Automated merge with ssh://hg.atheme.org//hg/audacious
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 08 Sep 2007 00:01:44 +0300
parents 6dff6e58ce71 (current diff) 00a8df8f8256 (diff)
children f62fc28b3e84 dbad02a89dc2
files
diffstat 1 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/dock.c	Fri Sep 07 19:53:45 2007 +0300
+++ b/src/audacious/dock.c	Sat Sep 08 00:01:44 2007 +0300
@@ -224,7 +224,6 @@
     for (node = list; node; node = g_list_next(node)) {
         dw = node->data;
         gtk_window_move(dw->w, x + dw->offset_x, y + dw->offset_y);
-        gdk_flush();
     }
 }
 
@@ -464,16 +463,15 @@
 dock_move_press(GList * window_list, GtkWindow * w,
                 GdkEventButton * event, gboolean move_list)
 {
-    gint mx, my;
     DockedWindow *dwin;
 
     if (cfg.show_wm_decorations)
         return;
 
     gtk_window_present(w);
-    gdk_window_get_pointer(GTK_WIDGET(w)->window, &mx, &my, NULL);
-    gtk_object_set_data(GTK_OBJECT(w), "move_offset_x", GINT_TO_POINTER(mx));
-    gtk_object_set_data(GTK_OBJECT(w), "move_offset_y", GINT_TO_POINTER(my));
+
+    gtk_object_set_data(GTK_OBJECT(w), "move_offset_x", GINT_TO_POINTER(event->x));
+    gtk_object_set_data(GTK_OBJECT(w), "move_offset_y", GINT_TO_POINTER(event->y));
     if (move_list)
         gtk_object_set_data(GTK_OBJECT(w), "docked_list",
                             get_docked_list(NULL, window_list, w, 0, 0));
@@ -490,12 +488,10 @@
 void
 dock_move_motion(GtkWindow * w, GdkEventMotion * event)
 {
-    gint offset_x, offset_y, win_x, win_y, x, y, mx, my;
+    gint offset_x, offset_y, win_x, win_y, x, y;
     GList *dlist;
     GList *window_list;
 
-    gdk_flush();
-
     if (!gtk_object_get_data(GTK_OBJECT(w), "is_moving"))
         return;
 
@@ -508,10 +504,8 @@
 
     gtk_window_get_position(w, &win_x, &win_y);
 
-    gdk_window_get_pointer(NULL, &mx, &my, NULL);
-
-    x = mx - offset_x;
-    y = my - offset_y;
+    x = event->x_root - offset_x;
+    y = event->y_root - offset_y;
 
     calc_snap_offset(dlist, window_list, x, y, &offset_x, &offset_y);
     x += offset_x;