# HG changeset patch # User nenolod # Date 1171089010 28800 # Node ID ea80fe9c3ba44a536fc302039b6848aba8ab87f7 # Parent 2aeea41ef023013a8197d152f8105fddb2b8a878 [svn] - use ConfigureNotify to set playlist location, a proper use of ICCCM. diff -r 2aeea41ef023 -r ea80fe9c3ba4 ChangeLog --- a/ChangeLog Fri Feb 09 22:05:03 2007 -0800 +++ b/ChangeLog Fri Feb 09 22:30:10 2007 -0800 @@ -1,3 +1,12 @@ +2007-02-10 06:05:03 +0000 William Pitcock + revision [3992] + - using ConfigureNotify for resizing is wrong per ICCCM guideline, + handling resize independently of the WM is correct per ICCCM. + + trunk/src/audacious/ui_playlist.c | 75 +++++++++++++++++++++++--------------- + 1 file changed, 46 insertions(+), 29 deletions(-) + + 2007-02-09 11:04:35 +0000 Yoshiki Yazawa revision [3990] - trying to open filebrowser when it is already open will raise the filebrowser. diff -r 2aeea41ef023 -r ea80fe9c3ba4 src/audacious/build_stamp.c --- a/src/audacious/build_stamp.c Fri Feb 09 22:05:03 2007 -0800 +++ b/src/audacious/build_stamp.c Fri Feb 09 22:30:10 2007 -0800 @@ -1,2 +1,2 @@ #include -const gchar *svn_stamp = "20070209-3990"; +const gchar *svn_stamp = "20070210-3992"; diff -r 2aeea41ef023 -r ea80fe9c3ba4 src/audacious/ui_playlist.c --- a/src/audacious/ui_playlist.c Fri Feb 09 22:05:03 2007 -0800 +++ b/src/audacious/ui_playlist.c Fri Feb 09 22:30:10 2007 -0800 @@ -685,7 +685,18 @@ gdk_window_clear(playlistwin->window); } +static gboolean +playlistwin_configure(GtkWidget * window, + GdkEventConfigure * event, gpointer data) +{ + if (!GTK_WIDGET_VISIBLE(window)) + return FALSE; + cfg.playlist_x = event->x; + cfg.playlist_y = event->y; + + return TRUE; +} static void playlistwin_motion(GtkWidget * widget, @@ -1044,25 +1055,14 @@ event->x >= playlistwin_get_width() - 31 && event->x < playlistwin_get_width() - 22))) { - /* This code is disabled because gtk_window_begin_resize_drag is - * highly broken. --nenolod - */ -#if 0 - /* NOTE: Workaround for bug #214 */ + g_print("foo\n"); + if (event->type != GDK_2BUTTON_PRESS && event->type != GDK_3BUTTON_PRESS) { - /* resize area */ playlistwin_resizing = TRUE; - gtk_window_begin_resize_drag(GTK_WINDOW(widget), - GDK_WINDOW_EDGE_SOUTH_EAST, - event->button, - event->x + xpos, event->y + ypos, - event->time); + playlistwin_resize_x = cfg.playlist_width - event->x; + playlistwin_resize_y = cfg.playlist_height - event->y; } -#endif - playlistwin_resizing = TRUE; - playlistwin_resize_x = cfg.playlist_width - event->x; - playlistwin_resize_y = cfg.playlist_height - event->y; } else if (event->button == 1 && REGION_L(12, 37, 29, 11)) { /* ADD button menu */ @@ -1721,6 +1721,8 @@ G_CALLBACK(playlistwin_focus_in), NULL); g_signal_connect_after(playlistwin, "focus_out_event", G_CALLBACK(playlistwin_focus_out), NULL); + g_signal_connect(playlistwin, "configure_event", + G_CALLBACK(playlistwin_configure), NULL); g_signal_connect(playlistwin, "style_set", G_CALLBACK(playlistwin_set_back_pixmap), NULL);