Mercurial > audlegacy
changeset 3446:9049fae12a72 trunk
the less gdk calls the better
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Fri, 07 Sep 2007 22:41:32 +0200 |
parents | d3fd60f14bb7 |
children | 00a8df8f8256 |
files | src/audacious/dock.c |
diffstat | 1 files changed, 3 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/dock.c Fri Sep 07 16:59:08 2007 +0200 +++ b/src/audacious/dock.c Fri Sep 07 22:41:32 2007 +0200 @@ -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(); } } @@ -490,12 +489,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 +505,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;