changeset 1068:de6e77a1ef79 trunk

[svn] - fix dock.c
author nenolod
date Tue, 16 May 2006 20:38:22 -0700
parents dc9373f0186b
children 9a3b3fd54df2
files audacious/equalizer.c audacious/genevent.c audacious/main.c audacious/mainwin.c audacious/ui_playlist.c
diffstat 5 files changed, 45 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/audacious/equalizer.c	Tue May 16 19:56:58 2006 -0700
+++ b/audacious/equalizer.c	Tue May 16 20:38:22 2006 -0700
@@ -1,4 +1,7 @@
-/*  BMP - Cross-platform multimedia player
+/*  Audacious - Cross-platform multimedia player
+ *  Copyright (C) 2005-2006  Audacious development team.
+ *
+ *  BMP - Cross-platform multimedia player
  *  Copyright (C) 2003-2004  BMP development team.
  *
  *  Based on XMMS:
@@ -423,8 +426,15 @@
 {
     GdkEvent *gevent;
 
-    handle_motion_cb(equalizerwin_wlist, widget, event);
-    draw_main_window(FALSE); /* XXX: shouldn't this be draw_equalizer_window()? */
+    if (dock_is_moving(GTK_WINDOW(equalizerwin)))
+    {
+        dock_move_motion(GTK_WINDOW(equalizerwin), event);
+    }
+    else 
+    {
+        handle_motion_cb(equalizerwin_wlist, widget, event);
+        draw_main_window(FALSE); /* XXX: shouldn't this be draw_equalizer_window()? */
+    }
 
     gdk_flush();
 
@@ -439,6 +449,7 @@
 {
     gdk_pointer_ungrab(GDK_CURRENT_TIME);
     gdk_flush();
+
     if (dock_is_moving(GTK_WINDOW(equalizerwin))) {
         dock_move_release(GTK_WINDOW(equalizerwin));
     }
@@ -743,7 +754,10 @@
 
     gtk_window_set_default_size(GTK_WINDOW(equalizerwin), width, height);
     gtk_window_set_resizable(GTK_WINDOW(equalizerwin), FALSE);
-    gtk_window_set_decorated(GTK_WINDOW(equalizerwin), cfg.show_wm_decorations);
+
+    dock_window_list = dock_window_set_decorated(dock_window_list,
+                                                 GTK_WINDOW(equalizerwin),
+                                                 cfg.show_wm_decorations);
 
     gtk_window_set_transient_for(GTK_WINDOW(equalizerwin),
                                  GTK_WINDOW(mainwin));
--- a/audacious/genevent.c	Tue May 16 19:56:58 2006 -0700
+++ b/audacious/genevent.c	Tue May 16 20:38:22 2006 -0700
@@ -54,7 +54,6 @@
 
 #include "controlsocket.h"
 #include "dnd.h"
-#include "dock.h"
 #include "effect.h"
 #include "equalizer.h"
 #include "general.h"
--- a/audacious/main.c	Tue May 16 19:56:58 2006 -0700
+++ b/audacious/main.c	Tue May 16 20:38:22 2006 -0700
@@ -54,7 +54,6 @@
 
 #include "controlsocket.h"
 #include "dnd.h"
-#include "dock.h"
 #include "effect.h"
 #include "equalizer.h"
 #include "general.h"
--- a/audacious/mainwin.c	Tue May 16 19:56:58 2006 -0700
+++ b/audacious/mainwin.c	Tue May 16 20:38:22 2006 -0700
@@ -1,4 +1,7 @@
-/*  BMP - Cross-platform multimedia player
+/*  Audacious - Cross-platform multimedia player
+ *  Copyright (C) 2005-2006  Audacious development team.
+ *
+ *  BMP - Cross-platform multimedia player
  *  Copyright (C) 2003-2004  BMP development team.
  *
  *  Based on XMMS:
@@ -3265,10 +3268,6 @@
                                                  GTK_WINDOW(mainwin),
                                                  cfg.show_wm_decorations);
 
-    dock_window_list = dock_window_set_decorated(dock_window_list,
-                                                 GTK_WINDOW(mainwin),
-                                                 cfg.show_wm_decorations);
-
     if (cfg.player_x != -1 && cfg.save_window_position)
         gtk_window_move(GTK_WINDOW(mainwin), cfg.player_x, cfg.player_y);
 
--- a/audacious/ui_playlist.c	Tue May 16 19:56:58 2006 -0700
+++ b/audacious/ui_playlist.c	Tue May 16 20:38:22 2006 -0700
@@ -1,4 +1,7 @@
-/*  BMP - Cross-platform multimedia player
+/*  Audacious - Cross-platform multimedia player
+ *  Copyright (C) 2005-2006  Audacious development team.
+ *
+ *  BMP - Cross-platform multimedia player
  *  Copyright (C) 2003-2004  BMP development team.
  *
  *  Based on XMMS:
@@ -533,9 +536,6 @@
     dock_shade(dock_window_list, GTK_WINDOW(playlistwin),
                playlistwin_get_height());
 
-    dock_shade(dock_window_list, GTK_WINDOW(playlistwin),
-               playlistwin_get_height());
-
     playlistwin_set_geometry_hints(cfg.playlist_shaded);
 
     gtk_window_resize(GTK_WINDOW(playlistwin),
@@ -579,13 +579,20 @@
     gdk_pointer_ungrab(GDK_CURRENT_TIME);
     playlistwin_resizing = FALSE;
     gdk_flush();
-
-    if (cfg.playlist_transparent)
-        playlistwin_update_list();
+ 
+    if (dock_is_moving(GTK_WINDOW(playlistwin)))
+    {
+       dock_move_release(GTK_WINDOW(playlistwin));
 
-    handle_release_cb(playlistwin_wlist, widget, event);
-    playlist_popup_destroy();
-    draw_playlist_window(FALSE);
+       if (cfg.playlist_transparent)
+           playlistwin_update_list();
+    }
+    else
+    {
+       handle_release_cb(playlistwin_wlist, widget, event);
+       playlist_popup_destroy();
+       draw_playlist_window(FALSE);
+    }
 }
 
 void
@@ -1113,6 +1120,8 @@
              && event->y < 14) {
         /* double click on title bar */
         playlistwin_shade_toggle();
+        if (dock_is_moving(GTK_WINDOW(playlistwin)))
+            dock_move_release(GTK_WINDOW(playlistwin));
         return TRUE;
     }
     else if (event->button == 3 &&
@@ -1644,8 +1653,10 @@
                                 playlistwin_get_height());
     gtk_window_set_resizable(GTK_WINDOW(playlistwin), TRUE);
     playlistwin_set_geometry_hints(cfg.playlist_shaded);
-    gtk_window_set_decorated(GTK_WINDOW(playlistwin), cfg.show_wm_decorations);
-
+    dock_window_list = dock_window_set_decorated(dock_window_list,
+                                                 GTK_WINDOW(playlistwin),
+                                                 cfg.show_wm_decorations);
+    
     gtk_window_set_transient_for(GTK_WINDOW(playlistwin),
                                  GTK_WINDOW(mainwin));
     gtk_window_set_skip_taskbar_hint(GTK_WINDOW(playlistwin), TRUE);