[Xfce4-commits] [apps/xfdashboard] 01/04: Add missing function for public API function to check if a window is maximized

noreply at xfce.org noreply at xfce.org
Wed Feb 10 09:18:15 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 7afdcec08a047f1ad707aafa7a13f9cdf15951e2
Author: Stephan Haller <nomad at froevel.de>
Date:   Wed Feb 10 09:04:57 2016 +0100

    Add missing function for public API function to check if a window is maximized
---
 xfdashboard/window-tracker-window.c |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/xfdashboard/window-tracker-window.c b/xfdashboard/window-tracker-window.c
index 36c85c1..4851d95 100644
--- a/xfdashboard/window-tracker-window.c
+++ b/xfdashboard/window-tracker-window.c
@@ -334,6 +334,28 @@ gboolean xfdashboard_window_tracker_window_is_minized(XfdashboardWindowTrackerWi
 	return(isMinimized);
 }
 
+/* Determine if window is maximized */
+gboolean xfdashboard_window_tracker_window_is_maxized(XfdashboardWindowTrackerWindow *inWindow)
+{
+	WnckWindowState		state;
+	gboolean			isMaximized;
+
+	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
+
+	isMaximized=FALSE;
+
+	/* Check if state of window has all maximized flags set */
+	state=wnck_window_get_state(WNCK_WINDOW(inWindow));
+	if((state & WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY) &&
+		(state & WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY))
+	{
+		isMaximized=TRUE;
+	}
+
+	/* Return maximized state of window */
+	return(isMaximized);
+}
+
 /* Determine if window is visible */
 gboolean xfdashboard_window_tracker_window_is_visible(XfdashboardWindowTrackerWindow *inWindow)
 {

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


More information about the Xfce4-commits mailing list