# HG changeset patch # User nenolod # Date 1138047888 28800 # Node ID fc968772e0969e3f589b11169bfa62211b9a28ac # Parent 1cf5ce3ec0c02d4c8ad3d2f763557e9f2304ba37 [svn] Remove ALL Xlib stuff from the skinning engine and use GDK where applicable instead. diff -r 1cf5ce3ec0c0 -r fc968772e096 audacious/dock.c --- a/audacious/dock.c Sat Jan 21 14:06:25 2006 -0800 +++ b/audacious/dock.c Mon Jan 23 12:24:48 2006 -0800 @@ -577,10 +577,8 @@ gint offset_x, offset_y, win_x, win_y, x, y, mx, my; GList *dlist; GList *window_list; - XEvent ev; gdk_flush(); - while (XCheckTypedEvent(GDK_DISPLAY(), MotionNotify, &ev)); if (!gtk_object_get_data(GTK_OBJECT(w), "is_moving")) return; diff -r 1cf5ce3ec0c0 -r fc968772e096 audacious/equalizer.c --- a/audacious/equalizer.c Sat Jan 21 14:06:25 2006 -0800 +++ b/audacious/equalizer.c Mon Jan 23 12:24:48 2006 -0800 @@ -421,8 +421,6 @@ equalizerwin_motion(GtkWidget * widget, GdkEventMotion * event, gpointer callback_data) { - XEvent ev; - if (dock_is_moving(GTK_WINDOW(equalizerwin))) { dock_move_motion(GTK_WINDOW(equalizerwin), event); } @@ -431,7 +429,6 @@ draw_main_window(FALSE); } gdk_flush(); - while (XCheckMaskEvent(GDK_DISPLAY(), ButtonMotionMask, &ev)); return FALSE; } diff -r 1cf5ce3ec0c0 -r fc968772e096 audacious/mainwin.c --- a/audacious/mainwin.c Sat Jan 21 14:06:25 2006 -0800 +++ b/audacious/mainwin.c Mon Jan 23 12:24:48 2006 -0800 @@ -955,15 +955,26 @@ GdkEventMotion * event, gpointer callback_data) { - XEvent ev; - gint i = 0; - - XSync(GDK_DISPLAY(), False); - - while (XCheckTypedEvent(GDK_DISPLAY(), MotionNotify, &ev)) { - event->x = ev.xmotion.x; - event->y = ev.xmotion.y; - i++; + int x, y; + GdkModifierType state; + + if (event->is_hint != FALSE) + { + gdk_window_get_pointer(GDK_WINDOW(mainwin->window), + &x, &y, &state); + + /* If it's a hint, we had to query X, so override the + * information we we're given... it's probably useless... --nenolod + */ + event->x = x; + event->y = y; + event->state = state; + } + else + { + x = event->x; + y = event->y; + state = event->state; } if (dock_is_moving(GTK_WINDOW(mainwin))) { @@ -973,6 +984,7 @@ handle_motion_cb(mainwin_wlist, widget, event); draw_main_window(FALSE); } + gdk_flush(); return FALSE; diff -r 1cf5ce3ec0c0 -r fc968772e096 audacious/ui_playlist.c --- a/audacious/ui_playlist.c Sat Jan 21 14:06:25 2006 -0800 +++ b/audacious/ui_playlist.c Mon Jan 23 12:24:48 2006 -0800 @@ -698,8 +698,6 @@ GdkEventMotion * event, gpointer callback_data) { - XEvent ev; - if (dock_is_moving(GTK_WINDOW(playlistwin))) { dock_move_motion(GTK_WINDOW(playlistwin), event); } @@ -708,7 +706,6 @@ draw_playlist_window(FALSE); } gdk_flush(); - while (XCheckMaskEvent(GDK_DISPLAY(), ButtonMotionMask, &ev)); } static void