[Xfce4-commits] [apps/xfdashboard] 04/04: Ensure that minimized flag is not set besides the maximized flags at window to consider it is maximized.

noreply at xfce.org noreply at xfce.org
Wed Feb 10 09:18:18 CET 2016


This is an automated email from the git hooks/post-receive script.

nomad pushed a commit to branch master
in repository apps/xfdashboard.

commit ca122f4599553fa41d28c08b3630166dcff1a6b7
Author: Stephan Haller <nomad at froevel.de>
Date:   Wed Feb 10 09:14:50 2016 +0100

    Ensure that minimized flag is not set besides the maximized flags at window to consider it is maximized.
    
    In my point of view it should be an error when the minimized flag is set along with the (both) flags for being maximized. But maybe it is just not a good name and it should be a 'hide' flag instead of 'minimized' flag. Then it makes sense that all these flags at set at once and we have to check additionally that the minimized (hide) flag is *not* set to consider that window is maximized.
---
 xfdashboard/window-tracker-window.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/xfdashboard/window-tracker-window.c b/xfdashboard/window-tracker-window.c
index fef0c68..9b93ce6 100644
--- a/xfdashboard/window-tracker-window.c
+++ b/xfdashboard/window-tracker-window.c
@@ -344,12 +344,17 @@ gboolean xfdashboard_window_tracker_window_is_maximized(XfdashboardWindowTracker
 
 	isMaximized=FALSE;
 
-	/* Check if state of window has all maximized flags set */
+	/* Check if state of window has all maximized flags set but it must not
+	 * have the minimized flag set.
+	 */
 	state=wnck_window_get_state(WNCK_WINDOW(inWindow));
-	if((state & WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY) &&
-		(state & WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY))
+	if(!(state & WNCK_WINDOW_STATE_MINIMIZED))
 	{
-		isMaximized=TRUE;
+		if((state & WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY) &&
+			(state & WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY))
+		{
+			isMaximized=TRUE;
+		}
 	}
 
 	/* Return maximized state of window */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list