[Xfce4-commits] [xfce/xfdesktop] 06/06: Prevent invalid method calls on XfdesktopWindowIconManager

noreply at xfce.org noreply at xfce.org
Sun Mar 15 13:27:14 CET 2015


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

eric pushed a commit to branch master
in repository xfce/xfdesktop.

commit 26bc8820e502f74b99648b213c28b681971e6ca6
Author: Thaddaeus Tintenfisch <thad.fisch at gmail.com>
Date:   Sat Mar 14 23:07:47 2015 +0100

    Prevent invalid method calls on XfdesktopWindowIconManager
    
    XfdesktopWindowIconManager does not provide drag_data_get and
    propose_drop_action.
    
    Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
---
 src/xfdesktop-icon-view.c |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index c8a0185..6e9b526 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -1716,6 +1716,9 @@ xfdesktop_icon_view_drag_data_get(GtkWidget *widget,
     
     TRACE("entering");
 
+    if(XFDESKTOP_IS_ICON_VIEW_MANAGER(icon_view) == FALSE)
+        return;
+
     /* Sometimes during a ctrl+drag this is NULL
      * but works when the file(s) are dropped */
     if(icon_view->priv->selected_icons == NULL)
@@ -1758,11 +1761,14 @@ xfdesktop_icon_view_drag_data_received(GtkWidget *widget,
          * meaningful value */
 
         GdkDragAction action = icon_view->priv->proposed_drop_action;
-        action = xfdesktop_icon_view_manager_propose_drop_action(icon_view->priv->manager,
-                                                                 icon_on_dest,
-                                                                 action,
-                                                                 context, data,
-                                                                 info);
+
+        if(XFDESKTOP_IS_ICON_VIEW_MANAGER(icon_view)) {
+            action = xfdesktop_icon_view_manager_propose_drop_action(icon_view->priv->manager,
+                                                                     icon_on_dest,
+                                                                     action,
+                                                                     context, data,
+                                                                     info);
+        }
 
         gdk_drag_status(context, action, time_);
     }

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


More information about the Xfce4-commits mailing list