From e9d4b4399754d7b4f21189641fb1011f723b46b0 Mon Sep 17 00:00:00 2001 From: Hudd Date: Mon, 23 Dec 2019 16:59:53 +0300 Subject: [PATCH] Window Buttons: Fix drag&drop in deskbar mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When Sorting order is set to “None, allow Drag&Drop”, drag&drop behaviour is counter-intuitive: in deskbar mode window buttons are arranged *vertically*, but the checks to determine whether to put the button before or after the cursor are done *horizontal* coordinate. 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 leads to a counter-intuitive behaviour: when I drop one button "between" two other buttons, the position where the button is actually dropped is seemingly random. --- plugins/tasklist/tasklist-widget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c index 426089fd..653c2999 100644 --- a/plugins/tasklist/tasklist-widget.c +++ b/plugins/tasklist/tasklist-widget.c @@ -3373,8 +3373,8 @@ 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 >= allocation.width / 2) - || (xfce_tasklist_vertical (tasklist) && y >= allocation.height / 2)) + if ((xfce_tasklist_horizontal (tasklist) && x >= allocation.width / 2) + || (!xfce_tasklist_horizontal (tasklist) && y >= allocation.height / 2)) sibling = g_list_next (sibling); xid = *((gulong *) gtk_selection_data_get_data (selection_data)); -- 2.24.1