Mercurial > audlegacy
changeset 3465:0dd74d0da472 trunk
the less gdk calls, the better
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Sun, 09 Sep 2007 12:50:57 +0200 |
parents | 01d0d353b579 |
children | 95d8ceb5e1d7 |
files | src/audacious/dock.c src/audacious/ui_playlist_manager.c |
diffstat | 2 files changed, 6 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/dock.c Sun Sep 09 00:07:40 2007 -0500 +++ b/src/audacious/dock.c Sun Sep 09 12:50:57 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(); } } @@ -471,7 +470,8 @@ return; gtk_window_present(w); - gdk_window_get_pointer(GTK_WIDGET(w)->window, &mx, &my, NULL); + mx = event->x; + my = event->y; 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)); if (move_list) @@ -490,12 +490,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 +506,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;
--- a/src/audacious/ui_playlist_manager.c Sun Sep 09 00:07:40 2007 -0500 +++ b/src/audacious/ui_playlist_manager.c Sun Sep 09 12:50:57 2007 +0200 @@ -207,7 +207,7 @@ GtkWidget *pmenu = (GtkWidget*)g_object_get_data( G_OBJECT(lv) , "menu" ); gtk_menu_popup( GTK_MENU(pmenu) , NULL , NULL , NULL , NULL , (event != NULL) ? event->button : 0, - gdk_event_get_time((GdkEvent*)event)); + event->time); return TRUE; }