Mercurial > audlegacy
changeset 484:fc968772e096 trunk
[svn] Remove ALL Xlib stuff from the skinning engine and use GDK where
applicable instead.
author | nenolod |
---|---|
date | Mon, 23 Jan 2006 12:24:48 -0800 |
parents | 1cf5ce3ec0c0 |
children | 59739d266dba |
files | audacious/dock.c audacious/equalizer.c audacious/mainwin.c audacious/ui_playlist.c |
diffstat | 4 files changed, 21 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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; }
--- 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;
--- 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