Mercurial > audlegacy
changeset 3245:75a62e429534
we don't need to grab pointer
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Sat, 04 Aug 2007 14:28:19 +0200 |
parents | 5eb62f17fe0e |
children | 2127f7108033 |
files | src/audacious/ui_equalizer.c src/audacious/ui_main.c src/audacious/ui_playlist.c |
diffstat | 3 files changed, 0 insertions(+), 50 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/ui_equalizer.c Sat Aug 04 13:50:13 2007 +0200 +++ b/src/audacious/ui_equalizer.c Sat Aug 04 14:28:19 2007 +0200 @@ -247,8 +247,6 @@ equalizerwin_press(GtkWidget * widget, GdkEventButton * event, gpointer callback_data) { - gboolean grab = TRUE; - if (event->button == 1 && event->type == GDK_BUTTON_PRESS && (cfg.easy_move || cfg.equalizer_shaded || event->y < 14)) { equalizerwin_raise(); @@ -268,14 +266,8 @@ */ ui_manager_popup_menu_show(GTK_MENU(mainwin_general_menu), event->x_root, event->y_root + 2, 3, event->time); - grab = FALSE; } - if (grab) - gdk_pointer_grab(GDK_WINDOW(equalizerwin->window), FALSE, - GDK_BUTTON_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, - NULL, NULL, GDK_CURRENT_TIME); - return FALSE; } @@ -283,9 +275,6 @@ equalizerwin_release(GtkWidget * widget, GdkEventButton * event, gpointer callback_data) { - gdk_pointer_ungrab(GDK_CURRENT_TIME); - gdk_flush(); - if (dock_is_moving(GTK_WINDOW(equalizerwin))) { dock_move_release(GTK_WINDOW(equalizerwin)); }
--- a/src/audacious/ui_main.c Sat Aug 04 13:50:13 2007 +0200 +++ b/src/audacious/ui_main.c Sat Aug 04 14:28:19 2007 +0200 @@ -840,16 +840,6 @@ GdkEventButton * event, gpointer callback_data) { - gdk_pointer_ungrab(GDK_CURRENT_TIME); - - /* - * The gdk_flush() is just for making sure that the pointer really - * gets ungrabbed before calling any button callbacks - * - */ - - gdk_flush(); - if (dock_is_moving(GTK_WINDOW(mainwin))) { dock_move_release(GTK_WINDOW(mainwin)); } @@ -888,9 +878,6 @@ GdkEventButton * event, gpointer callback_data) { - - gboolean grab = TRUE; - if (cfg.doublesize) { /* * A hack to make doublesize transparent to callbacks. @@ -920,7 +907,6 @@ ui_manager_popup_menu_show(GTK_MENU(mainwin_playback_menu), event->x_root, event->y_root, 3, event->time); - grab = FALSE; } else { /* * Pop up the main menu a few pixels down. @@ -934,16 +920,9 @@ ui_manager_popup_menu_show(GTK_MENU(mainwin_general_menu), event->x_root, event->y_root, 3, event->time); - grab = FALSE; } } - if (grab) - gdk_pointer_grab(mainwin->window, FALSE, - GDK_BUTTON_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK, - GDK_WINDOW(GDK_NONE), NULL, GDK_CURRENT_TIME); - return FALSE; }
--- a/src/audacious/ui_playlist.c Sat Aug 04 13:50:13 2007 +0200 +++ b/src/audacious/ui_playlist.c Sat Aug 04 14:28:19 2007 +0200 @@ -416,9 +416,7 @@ if (event->button == 3) return; - gdk_pointer_ungrab(GDK_CURRENT_TIME); playlistwin_resizing = FALSE; - gdk_flush(); if (dock_is_moving(GTK_WINDOW(playlistwin))) dock_move_release(GTK_WINDOW(playlistwin)); @@ -1007,7 +1005,6 @@ GdkEventButton * event, gpointer callback_data) { - gboolean grab = TRUE; gint xpos, ypos; GtkRequisition req; Playlist *playlist = playlist_get_active(); @@ -1038,7 +1035,6 @@ (ypos + playlistwin_get_height()) - 8 - req.height, event->button, event->time); - grab = FALSE; } else if (event->button == 1 && REGION_L(41, 66, 29, 11)) { /* SUB button menu */ @@ -1048,7 +1044,6 @@ (ypos + playlistwin_get_height()) - 8 - req.height, event->button, event->time); - grab = FALSE; } else if (event->button == 1 && REGION_L(70, 95, 29, 11)) { /* SEL button menu */ @@ -1058,7 +1053,6 @@ (ypos + playlistwin_get_height()) - 8 - req.height, event->button, event->time); - grab = FALSE; } else if (event->button == 1 && REGION_L(99, 124, 29, 11)) { /* MISC button menu */ @@ -1068,7 +1062,6 @@ (ypos + playlistwin_get_height()) - 8 - req.height, event->button, event->time); - grab = FALSE; } else if (event->button == 1 && REGION_R(46, 23, 29, 11)) { /* LIST button menu */ @@ -1078,7 +1071,6 @@ (ypos + playlistwin_get_height()) - 8 - req.height, event->button, event->time); - grab = FALSE; } else if (event->button == 1 && REGION_R(82, 54, 15, 9)) { if (cfg.timer_mode == TIMER_ELAPSED) @@ -1116,7 +1108,6 @@ */ ui_manager_popup_menu_show(GTK_MENU(mainwin_general_menu), event->x_root, event->y_root + 2, 3, event->time); - grab = FALSE; } else if (event->button == 1 && (event->state & GDK_MOD1_MASK)) { @@ -1129,17 +1120,8 @@ idx = GPOINTER_TO_INT(playlist_get_selected(playlist)->data); playlist_queue_position(playlist, idx); } - - grab = FALSE; } - if (grab) - gdk_pointer_grab(playlistwin->window, FALSE, - GDK_BUTTON_MOTION_MASK | GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON1_MOTION_MASK, NULL, NULL, - GDK_CURRENT_TIME); - return FALSE; }