Mercurial > audlegacy
changeset 3311:8560d99e36be trunk
revise ui_skinned_window_configure
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Fri, 10 Aug 2007 18:18:19 +0200 |
parents | dfbbad8d7953 |
children | f327c3b3ac7e |
files | src/audacious/ui_equalizer.c src/audacious/ui_main.c src/audacious/ui_playlist.c src/audacious/ui_skinned_window.c |
diffstat | 4 files changed, 21 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/ui_equalizer.c Fri Aug 10 10:47:03 2007 -0500 +++ b/src/audacious/ui_equalizer.c Fri Aug 10 18:18:19 2007 +0200 @@ -309,19 +309,6 @@ return FALSE; } -static gboolean -equalizerwin_configure(GtkWidget * window, - GdkEventConfigure * event, - gpointer data) -{ - if (!GTK_WIDGET_VISIBLE(window)) - return FALSE; - - cfg.equalizer_x = event->x; - cfg.equalizer_y = event->y; - return FALSE; -} - static void equalizerwin_close_cb(void) { @@ -572,8 +559,6 @@ G_CALLBACK(equalizerwin_press), NULL); g_signal_connect(equalizerwin, "button_release_event", G_CALLBACK(equalizerwin_release), NULL); - g_signal_connect(equalizerwin, "configure_event", - G_CALLBACK(equalizerwin_configure), NULL); g_signal_connect(equalizerwin, "key_press_event", G_CALLBACK(equalizerwin_keypress), NULL); }
--- a/src/audacious/ui_main.c Fri Aug 10 10:47:03 2007 -0500 +++ b/src/audacious/ui_main.c Fri Aug 10 18:18:19 2007 +0200 @@ -1107,23 +1107,6 @@ gtk_widget_grab_default(jump); } -static gboolean -mainwin_configure(GtkWidget * window, - GdkEventConfigure * event, - gpointer data) -{ - if (!GTK_WIDGET_VISIBLE(window)) - return FALSE; - - if (cfg.show_wm_decorations) - gdk_window_get_root_origin(window->window, - &cfg.player_x, &cfg.player_y); - else - gdk_window_get_deskrelative_origin(window->window, - &cfg.player_x, &cfg.player_y); - return FALSE; -} - /* * Rewritten 09/13/06: * @@ -2648,8 +2631,6 @@ G_CALLBACK(mainwin_scrolled), NULL); g_signal_connect(mainwin, "button_release_event", G_CALLBACK(mainwin_mouse_button_release), NULL); - g_signal_connect(mainwin, "configure_event", - G_CALLBACK(mainwin_configure), NULL); bmp_drag_dest_set(mainwin);
--- a/src/audacious/ui_playlist.c Fri Aug 10 10:47:03 2007 -0500 +++ b/src/audacious/ui_playlist.c Fri Aug 10 18:18:19 2007 +0200 @@ -1594,6 +1594,7 @@ void playlistwin_show(void) { + gtk_window_move(GTK_WINDOW(playlistwin), cfg.playlist_x, cfg.playlist_y); GtkAction *action = gtk_action_group_get_action( toggleaction_group_others , "show playlist editor" ); gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(action) , TRUE );
--- a/src/audacious/ui_skinned_window.c Fri Aug 10 10:47:03 2007 -0500 +++ b/src/audacious/ui_skinned_window.c Fri Aug 10 18:18:19 2007 +0200 @@ -79,6 +79,26 @@ if (widget_class->configure_event != NULL) widget_class->configure_event(widget, event); + if (!GTK_WIDGET_VISIBLE(widget)) + return FALSE; + + switch(window->type) { + case WINDOW_MAIN: + if (cfg.show_wm_decorations) + gdk_window_get_root_origin(widget->window, &cfg.player_x, &cfg.player_y); + else + gdk_window_get_deskrelative_origin(widget->window, &cfg.player_x, &cfg.player_y); + break; + case WINDOW_EQ: + cfg.equalizer_x = event->x; + cfg.equalizer_y = event->y; + break; + case WINDOW_PLAYLIST: + cfg.playlist_x = event->x; + cfg.playlist_y = event->y; + break; + } + window->x = event->x; window->y = event->y;