[Xfce4-commits] [apps/xfdashboard] 01/01: Switch to workspace where last known active window of a running application is placed at first and then activate this window. Otherwise the window will be move to current workspace.
noreply at xfce.org
noreply at xfce.org
Wed Sep 16 18:31:50 CEST 2015
This is an automated email from the git hooks/post-receive script.
nomad pushed a commit to branch master
in repository apps/xfdashboard.
commit 2f77e9a85ae1a865a955731542f3abafb34abf7f
Author: Stephan Haller <nomad at froevel.de>
Date: Wed Sep 16 18:30:45 2015 +0200
Switch to workspace where last known active window of a running application is placed at first and then activate this window. Otherwise the window will be move to current workspace.
---
xfdashboard/quicklaunch.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/xfdashboard/quicklaunch.c b/xfdashboard/quicklaunch.c
index 44a3fef..4b6af09 100644
--- a/xfdashboard/quicklaunch.c
+++ b/xfdashboard/quicklaunch.c
@@ -309,9 +309,9 @@ static gboolean _xfdashboard_quicklaunch_has_favourite_appinfo(XfdashboardQuickl
/* An application icon (favourite) in quicklaunch was clicked */
static void _xfdashboard_quicklaunch_on_favourite_clicked(XfdashboardQuicklaunch *self, gpointer inUserData)
{
- XfdashboardQuicklaunchPrivate *priv;
- XfdashboardApplicationButton *button;
- gboolean launchNewInstance;
+ XfdashboardQuicklaunchPrivate *priv;
+ XfdashboardApplicationButton *button;
+ gboolean launchNewInstance;
g_return_if_fail(XFDASHBOARD_IS_QUICKLAUNCH(self));
g_return_if_fail(XFDASHBOARD_IS_APPLICATION_BUTTON(inUserData));
@@ -328,9 +328,10 @@ static void _xfdashboard_quicklaunch_on_favourite_clicked(XfdashboardQuicklaunch
DEFAULT_LAUNCH_NEW_INSTANCE);
if(!launchNewInstance)
{
- GAppInfo *appInfo;
- const GList *windows;
- XfdashboardWindowTrackerWindow *lastActiveWindow;
+ GAppInfo *appInfo;
+ const GList *windows;
+ XfdashboardWindowTrackerWindow *lastActiveWindow;
+ XfdashboardWindowTrackerWorkspace *lastActiveWorkspace;
/* Get application information of application button */
appInfo=xfdashboard_application_button_get_app_info(button);
@@ -356,9 +357,16 @@ static void _xfdashboard_quicklaunch_on_favourite_clicked(XfdashboardQuicklaunch
/* Get last active window for application which is the first one in list */
lastActiveWindow=XFDASHBOARD_WINDOW_TRACKER_WINDOW(windows->data);
- /* Activate last active window of application if available */
+ /* If last active window for application if available, wwitch to workspace
+ * where it is placed at and activate it.
+ */
if(lastActiveWindow)
{
+ /* Switch to workspace where window is placed at */
+ lastActiveWorkspace=xfdashboard_window_tracker_window_get_workspace(lastActiveWindow);
+ xfdashboard_window_tracker_workspace_activate(lastActiveWorkspace);
+
+ /* Activate window */
xfdashboard_window_tracker_window_activate(lastActiveWindow);
/* Activating last active window of application seems to be successfully
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list