[Xfce4-commits] [apps/xfdashboard] 03/03: Allow and handle dragging window from XfdashboardLiveWorkspace to XfdashboardWindowsView

noreply at xfce.org noreply at xfce.org
Tue May 2 17:02:11 CEST 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 6e1f9a9f36d0487aa02af1cc29caee3e90a1a85f
Author: Stephan Haller <nomad at froevel.de>
Date:   Tue May 2 16:55:18 2017 +0200

    Allow and handle dragging window from XfdashboardLiveWorkspace to XfdashboardWindowsView
    
    This commit fixes finally the long-lating issue GH #79
---
 libxfdashboard/workspace-selector.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/libxfdashboard/workspace-selector.c b/libxfdashboard/workspace-selector.c
index e7faa95..e3d0ed3 100644
--- a/libxfdashboard/workspace-selector.c
+++ b/libxfdashboard/workspace-selector.c
@@ -307,13 +307,25 @@ static gboolean _xfdashboard_workspace_selector_on_drop_begin(XfdashboardLiveWor
 	dragSource=xfdashboard_drag_action_get_source(inDragAction);
 	draggedActor=xfdashboard_drag_action_get_actor(inDragAction);
 
-	/* Check if we can handle dragged actor from given source */
+	/* We can handle dragged actor if it is a live window and its source
+	 * is windows view.
+	 */
 	if(XFDASHBOARD_IS_WINDOWS_VIEW(dragSource) &&
 		XFDASHBOARD_IS_LIVE_WINDOW(draggedActor))
 	{
 		canHandle=TRUE;
 	}
 
+	/* We can handle dragged actor if it is a live window and its source
+	 * is a live workspace
+	 */
+	if(XFDASHBOARD_IS_LIVE_WORKSPACE(dragSource) &&
+		XFDASHBOARD_IS_LIVE_WINDOW_SIMPLE(draggedActor))
+	{
+		canHandle=TRUE;
+	}
+
+	/* We can handle dragged actor if it is an application button */
 	if(XFDASHBOARD_IS_APPLICATION_BUTTON(draggedActor))
 	{
 		canHandle=TRUE;
@@ -342,7 +354,7 @@ static void _xfdashboard_workspace_selector_on_drop_drop(XfdashboardLiveWorkspac
 	draggedActor=xfdashboard_drag_action_get_actor(inDragAction);
 
 	/* Check if dragged actor is a window so move window to workspace */
-	if(XFDASHBOARD_IS_LIVE_WINDOW(draggedActor))
+	if(XFDASHBOARD_IS_LIVE_WINDOW_SIMPLE(draggedActor))
 	{
 		XfdashboardWindowTrackerWindow	*window;
 

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


More information about the Xfce4-commits mailing list