From f943531d734890027f700253134760aa483fbea2 Mon Sep 17 00:00:00 2001 From: Hudd Date: Fri, 27 Mar 2015 03:08:11 +0300 Subject: Window Buttons: Fix drag&drop in deskbar mode When Sorting order is set to “None, allow Drag&Drop”, drag&drop behaviour is counter-intuitive: in deskbar mode window button are arranged *vertically*, but code checks the *horizontal* coordinate to determine whether to put button before or after cursor. In other words, when dragged button is dropped on top of another button, it checks if it was dropped on left or right half, instead of checking for top/bottom half. This patch fixes this little oversight. --- plugins/tasklist/tasklist-widget.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)); -- 2.3.4