[Xfce4-commits] [apps/xfdashboard] 01/01: Move to workspace where the window to activate (by clicking it in windows view) is placed on if it is on a different workspace than the active one.
noreply at xfce.org
noreply at xfce.org
Thu Jun 9 08:47:56 CEST 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 653b38b95f7281691f42f8c9fb6e9171e9e50db5
Author: Stephan Haller <nomad at froevel.de>
Date: Thu Jun 9 08:45:54 2016 +0200
Move to workspace where the window to activate (by clicking it in windows view) is placed on if it is on a different workspace than the active one.
This only happens in windows view if 'filter-workspace-windows' is set to FALSE. The default value is TRUE so this code path is usually not run.
This commit addresses issue GH #126
---
libxfdashboard/windows-view.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/libxfdashboard/windows-view.c b/libxfdashboard/windows-view.c
index 5ce5b4a..e62e5b2 100644
--- a/libxfdashboard/windows-view.c
+++ b/libxfdashboard/windows-view.c
@@ -718,16 +718,30 @@ static void _xfdashboard_windows_view_on_window_monitor_changed(XfdashboardWindo
static void _xfdashboard_windows_view_on_window_clicked(XfdashboardWindowsView *self,
gpointer inUserData)
{
+ XfdashboardWindowsViewPrivate *priv;
XfdashboardLiveWindow *liveWindow;
XfdashboardWindowTrackerWindow *window;
+ XfdashboardWindowTrackerWorkspace *activeWorkspace;
+ XfdashboardWindowTrackerWorkspace *windowWorkspace;
g_return_if_fail(XFDASHBOARD_IS_WINDOWS_VIEW(self));
g_return_if_fail(XFDASHBOARD_IS_LIVE_WINDOW(inUserData));
+ priv=self->priv;
liveWindow=XFDASHBOARD_LIVE_WINDOW(inUserData);
- /* Activate clicked window */
- window=XFDASHBOARD_WINDOW_TRACKER_WINDOW(xfdashboard_live_window_get_window(liveWindow));
+ /* Get window to activate */
+ window=xfdashboard_live_window_get_window(liveWindow);
+
+ /* Move to workspace if window to active is on a different one than the active one */
+ activeWorkspace=xfdashboard_window_tracker_get_active_workspace(priv->windowTracker);
+ if(!xfdashboard_window_tracker_window_is_on_workspace(window, activeWorkspace))
+ {
+ windowWorkspace=xfdashboard_window_tracker_window_get_workspace(window);
+ xfdashboard_window_tracker_workspace_activate(windowWorkspace);
+ }
+
+ /* Activate window */
xfdashboard_window_tracker_window_activate(window);
/* Quit application */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list