[Xfce4-commits] [apps/xfdashboard] 01/02: Remove stupid "shortcut" functions xfdashboard_window_tracker_window_is_visible_on_workspace() and xfdashboard_window_tracker_window_is_visible_on_monitor() as they lead to false assumption and it should not harm anyone to call two functions, i.e. xfdashboard_window_tracker_window_is_visible() followed or preceeded by xfdashboard_window_tracker_window_is_on_workspace().

noreply at xfce.org noreply at xfce.org
Fri Feb 3 13:13:46 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 a813174a210b9f6918f237790707f329ec1a7c32
Author: Stephan Haller <nomad at froevel.de>
Date:   Thu Feb 2 16:24:20 2017 +0100

    Remove stupid "shortcut" functions xfdashboard_window_tracker_window_is_visible_on_workspace() and xfdashboard_window_tracker_window_is_visible_on_monitor() as they lead to false assumption and it should not harm anyone to call two functions, i.e. xfdashboard_window_tracker_window_is_visible() followed or preceeded by xfdashboard_window_tracker_window_is_on_workspace().
---
 libxfdashboard/live-workspace.c        |  4 +++-
 libxfdashboard/window-tracker-window.c | 22 ----------------------
 libxfdashboard/window-tracker-window.h |  4 ----
 3 files changed, 3 insertions(+), 27 deletions(-)

diff --git a/libxfdashboard/live-workspace.c b/libxfdashboard/live-workspace.c
index 2417867..536e7a6 100644
--- a/libxfdashboard/live-workspace.c
+++ b/libxfdashboard/live-workspace.c
@@ -106,7 +106,9 @@ static gboolean _xfdashboard_live_workspace_is_visible_window(XfdashboardLiveWor
 	/* Determine if windows should be shown depending on its state */
 	if(xfdashboard_window_tracker_window_is_skip_pager(inWindow) ||
 		xfdashboard_window_tracker_window_is_skip_tasklist(inWindow) ||
-		(priv->workspace && !xfdashboard_window_tracker_window_is_visible_on_workspace(inWindow, priv->workspace)) ||
+		!xfdashboard_window_tracker_window_is_visible(inWindow) ||
+		(!priv->workspace && !xfdashboard_window_tracker_window_is_pinned(inWindow)) ||
+		(priv->workspace && !xfdashboard_window_tracker_window_is_on_workspace(inWindow, priv->workspace)) ||
 		xfdashboard_window_tracker_window_is_stage(inWindow))
 	{
 		return(FALSE);
diff --git a/libxfdashboard/window-tracker-window.c b/libxfdashboard/window-tracker-window.c
index a08dc3d..97ed109 100644
--- a/libxfdashboard/window-tracker-window.c
+++ b/libxfdashboard/window-tracker-window.c
@@ -401,28 +401,6 @@ gboolean xfdashboard_window_tracker_window_is_visible(XfdashboardWindowTrackerWi
 	return(TRUE);
 }
 
-gboolean xfdashboard_window_tracker_window_is_visible_on_workspace(XfdashboardWindowTrackerWindow *inWindow,
-																	XfdashboardWindowTrackerWorkspace *inWorkspace)
-{
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
-	g_return_val_if_fail(WNCK_IS_WORKSPACE(inWorkspace), FALSE);
-
-	/* Check if window is visible generally and if it is on requested workspace */
-	return(xfdashboard_window_tracker_window_is_visible(inWindow) &&
-			wnck_window_is_on_workspace(WNCK_WINDOW(inWindow), WNCK_WORKSPACE(inWorkspace)));
-}
-
-gboolean xfdashboard_window_tracker_window_is_visible_on_monitor(XfdashboardWindowTrackerWindow *inWindow,
-																	XfdashboardWindowTrackerMonitor *inMonitor)
-{
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(inMonitor), FALSE);
-
-	/* Check if window is visible generally and if it is on requested monitor */
-	return(xfdashboard_window_tracker_window_is_visible(inWindow) &&
-			xfdashboard_window_tracker_window_is_on_monitor(inWindow, inMonitor));
-}
-
 /* Set visibility of window (show/hide) */
 void xfdashboard_window_tracker_window_show(XfdashboardWindowTrackerWindow *inWindow)
 {
diff --git a/libxfdashboard/window-tracker-window.h b/libxfdashboard/window-tracker-window.h
index a46c6b8..a6d2572 100644
--- a/libxfdashboard/window-tracker-window.h
+++ b/libxfdashboard/window-tracker-window.h
@@ -62,10 +62,6 @@ gboolean xfdashboard_window_tracker_window_is_minimized(XfdashboardWindowTracker
 gboolean xfdashboard_window_tracker_window_is_maximized(XfdashboardWindowTrackerWindow *inWindow);
 gboolean xfdashboard_window_tracker_window_is_fullscreen(XfdashboardWindowTrackerWindow *inWindow);
 gboolean xfdashboard_window_tracker_window_is_visible(XfdashboardWindowTrackerWindow *inWindow);
-gboolean xfdashboard_window_tracker_window_is_visible_on_workspace(XfdashboardWindowTrackerWindow *inWindow,
-																	XfdashboardWindowTrackerWorkspace *inWorkspace);
-gboolean xfdashboard_window_tracker_window_is_visible_on_monitor(XfdashboardWindowTrackerWindow *inWindow,
-																	XfdashboardWindowTrackerMonitor *inMonitor);
 void xfdashboard_window_tracker_window_show(XfdashboardWindowTrackerWindow *inWindow);
 void xfdashboard_window_tracker_window_hide(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