From f943531d734890027f700253134760aa483fbea2 Mon Sep 17 00:00:00 2001 From: Hudd Date: Fri, 27 Mar 2015 03:08:11 +0300 Subject: Tasklist: Make drag&drop in the deskbar mode more intuitive When sorting order is set to Drag&Drop in the deskbar mode, tasklist plugin uses the x coordinate to determine where to put dragged buttons. This behaviour is counter-intuitive. Add check for deskbar mode in xfce_tasklist_button_drag_data_received, and use the y coordinate in such case. I suspect, it was forgotten to be updated when the deskbar mode was added. --- 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