[Xfce4-commits] [apps/xfdashboard] 01/01: Add function to XfdashboardWindowTrackerWindow to get the parent window of a window if there is any.

noreply at xfce.org noreply at xfce.org
Wed Jan 18 10:12:27 CET 2017


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

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

commit aca83c5e6a737794f1024e22727fc21b665f6ba7
Author: Stephan Haller <nomad at froevel.de>
Date:   Wed Jan 18 10:11:38 2017 +0100

    Add function to XfdashboardWindowTrackerWindow to get the parent window of a window if there is any.
---
 libxfdashboard/window-tracker-window.c | 8 ++++++++
 libxfdashboard/window-tracker-window.h | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/libxfdashboard/window-tracker-window.c b/libxfdashboard/window-tracker-window.c
index 9fe2536..a08dc3d 100644
--- a/libxfdashboard/window-tracker-window.c
+++ b/libxfdashboard/window-tracker-window.c
@@ -438,6 +438,14 @@ void xfdashboard_window_tracker_window_hide(XfdashboardWindowTrackerWindow *inWi
 	wnck_window_minimize(WNCK_WINDOW(inWindow));
 }
 
+/* Get parent window if this window is a child window */
+XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_window_get_parent_window(XfdashboardWindowTrackerWindow *inWindow)
+{
+	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), NULL);
+
+	return(wnck_window_get_transient(WNCK_WINDOW(inWindow)));
+}
+
 /* Get workspace where window is on */
 XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_window_get_workspace(XfdashboardWindowTrackerWindow *inWindow)
 {
diff --git a/libxfdashboard/window-tracker-window.h b/libxfdashboard/window-tracker-window.h
index ab29c4f..a46c6b8 100644
--- a/libxfdashboard/window-tracker-window.h
+++ b/libxfdashboard/window-tracker-window.h
@@ -69,6 +69,8 @@ gboolean xfdashboard_window_tracker_window_is_visible_on_monitor(XfdashboardWind
 void xfdashboard_window_tracker_window_show(XfdashboardWindowTrackerWindow *inWindow);
 void xfdashboard_window_tracker_window_hide(XfdashboardWindowTrackerWindow *inWindow);
 
+XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_window_get_parent_window(XfdashboardWindowTrackerWindow *inWindow);
+
 XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_window_get_workspace(XfdashboardWindowTrackerWindow *inWindow);
 gboolean xfdashboard_window_tracker_window_is_on_workspace(XfdashboardWindowTrackerWindow *inWindow,
 															XfdashboardWindowTrackerWorkspace *inWorkspace);

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


More information about the Xfce4-commits mailing list