[Xfce4-commits] <xfmpc:master> status-icon: Restore window position between show/hide action

Mike Massonnet noreply at xfce.org
Sun Oct 23 16:34:01 CEST 2011


Updating branch refs/heads/master
         to 36d22ac107e1fb4f23ecd5f1edcb5ff88c5f671e (commit)
       from 3687eb1c69ac4e0910e865910e5752935a426be0 (commit)

commit 36d22ac107e1fb4f23ecd5f1edcb5ff88c5f671e
Author: Mike Massonnet <mmassonnet at xfce.org>
Date:   Sun Oct 23 16:36:01 2011 +0200

    status-icon: Restore window position between show/hide action

 src/main-window.vala |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/main-window.vala b/src/main-window.vala
index a275a7b..d172484 100644
--- a/src/main-window.vala
+++ b/src/main-window.vala
@@ -144,7 +144,8 @@ namespace Xfmpc {
 				this.show ();
 				this.deiconify ();
 			} else {
-				this.hide ();
+				this.close_window ();
+				move (this.preferences.last_window_posx, this.preferences.last_window_posy);
 			}
 		}
 
@@ -216,11 +217,6 @@ namespace Xfmpc {
 			int posx, posy;
 			int width, height;
 
-			if (this.status_icon.visible) {
-				this.hide ();
-				return;
-			}
-
 			get_position (out posx, out posy);
 			get_size (out width, out height);
 
@@ -229,6 +225,11 @@ namespace Xfmpc {
 			this.preferences.last_window_width = width;
 			this.preferences.last_window_height = height;
 
+			if (this.status_icon.visible) {
+				this.hide ();
+				return;
+			}
+
 			main_quit ();
 		}
 


More information about the Xfce4-commits mailing list