comparison audacious/mainwin.c @ 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 a4ec7dfe5672
children 59739d266dba
comparison
equal deleted inserted replaced
483:1cf5ce3ec0c0 484:fc968772e096
953 static gboolean 953 static gboolean
954 mainwin_motion(GtkWidget * widget, 954 mainwin_motion(GtkWidget * widget,
955 GdkEventMotion * event, 955 GdkEventMotion * event,
956 gpointer callback_data) 956 gpointer callback_data)
957 { 957 {
958 XEvent ev; 958 int x, y;
959 gint i = 0; 959 GdkModifierType state;
960 960
961 XSync(GDK_DISPLAY(), False); 961 if (event->is_hint != FALSE)
962 962 {
963 while (XCheckTypedEvent(GDK_DISPLAY(), MotionNotify, &ev)) { 963 gdk_window_get_pointer(GDK_WINDOW(mainwin->window),
964 event->x = ev.xmotion.x; 964 &x, &y, &state);
965 event->y = ev.xmotion.y; 965
966 i++; 966 /* If it's a hint, we had to query X, so override the
967 * information we we're given... it's probably useless... --nenolod
968 */
969 event->x = x;
970 event->y = y;
971 event->state = state;
972 }
973 else
974 {
975 x = event->x;
976 y = event->y;
977 state = event->state;
967 } 978 }
968 979
969 if (dock_is_moving(GTK_WINDOW(mainwin))) { 980 if (dock_is_moving(GTK_WINDOW(mainwin))) {
970 dock_move_motion(GTK_WINDOW(mainwin), event); 981 dock_move_motion(GTK_WINDOW(mainwin), event);
971 } 982 }
972 else { 983 else {
973 handle_motion_cb(mainwin_wlist, widget, event); 984 handle_motion_cb(mainwin_wlist, widget, event);
974 draw_main_window(FALSE); 985 draw_main_window(FALSE);
975 } 986 }
987
976 gdk_flush(); 988 gdk_flush();
977 989
978 return FALSE; 990 return FALSE;
979 } 991 }
980 992