[PATCH] Tasklist: Make d&d in deskbar mode behave as in vertical mode

Hudd haddayn at gmail.com
Fri Mar 27 02:20:54 CET 2015


On Fri, 2015-03-27 at 04:13 +0300, Hudd wrote:
> ---
> diff --git a/plugins/tasklist/tasklist-widget.c
> b/plugins/tasklist/tasklist-widget.c
> index d596813..0482d7d 100644
> --- a/plugins/tasklist/tasklist-widget.c
> +++ b/plugins/tasklist/tasklist-widget.c
> @@ -3071,8 +3071,9 @@ xfce_tasklist_button_drag_data_received (GtkWidget
> *button,
>    sibling = g_list_find (tasklist->windows, child2);
>    panel_return_if_fail (sibling != NULL);
>  
> -  if ((!xfce_tasklist_vertical (tasklist) && x >=
> button->allocation.width / 2)
> -      || (xfce_tasklist_vertical (tasklist) && y >=
> button->allocation.height / 2))
> +  if ((xfce_tasklist_horizontal (tasklist) && x >=
> button->allocation.width / 2)
> +      || ((xfce_tasklist_vertical (tasklist) || xfce_tasklist_deskbar
> (tasklist))
> +          && y >= button->allocation.height / 2))
>      sibling = g_list_next (sibling);
>  
>    xid = *((gulong *) gtk_selection_data_get_data (selection_data));
> 

Goddammit! I am sorry, I forgot to disable formatting in my mail client.
Here's proper diff.

---
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index d596813..0482d7d 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -3071,8 +3071,9 @@ xfce_tasklist_button_drag_data_received (GtkWidget         *button,
   sibling = g_list_find (tasklist->windows, child2);
   panel_return_if_fail (sibling != NULL);
 
-  if ((!xfce_tasklist_vertical (tasklist) && x >= button->allocation.width / 2)
-      || (xfce_tasklist_vertical (tasklist) && y >= button->allocation.height / 2))
+  if ((xfce_tasklist_horizontal (tasklist) && x >= button->allocation.width / 2)
+      || ((xfce_tasklist_vertical (tasklist) || xfce_tasklist_deskbar (tasklist))
+          && y >= button->allocation.height / 2))
     sibling = g_list_next (sibling);
 
   xid = *((gulong *) gtk_selection_data_get_data (selection_data));




More information about the Xfce4-dev mailing list