[PATCH] Tasklist: Make d&d in deskbar mode behave as in vertical mode
Hudd
haddayn at gmail.com
Fri Mar 27 02:13:49 CET 2015
Previous behaviour when drag & dropping window buttons was
conuter-intuitive: buttons are arranged vertically in deskbar mode,
yet the x coordinate was used to determine where to put the dropped
button.
I.e. when a button was dropped on the right half of other button,
it was placed above, and when dropped on the left side, it was
placed below the button under cursor.
Add check for deskbar mode, and use the y coordinate instead.
I suspect that this function was forgotten to be updated when deskbar
mode was added.
---
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