Sort tasks on taskbar: handle task drag and drop (disabled, work in progress) - issue 478

git-svn-id: http://tint2.googlecode.com/svn/trunk@742 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
o9000 2015-03-28 21:15:30 +00:00 committed by mrovi9000@gmail.com
parent 82fe74743c
commit 67d5bfcfce

View file

@ -462,6 +462,9 @@ void event_button_motion_notify (XEvent *e)
// If the event takes place on the same taskbar as the task being dragged
if(event_taskbar == task_drag->area.parent) {
if (sort_tasks_method == TASKBAR_SORT_POSITION) {
sort_tasks(event_taskbar);
} else {
// Swap the task_drag with the task on the event's location (if they differ)
if(event_task && event_task != task_drag) {
GSList * drag_iter = g_slist_find(event_taskbar->area.list, task_drag);
@ -475,8 +478,6 @@ void event_button_motion_notify (XEvent *e)
task_dragged = 1;
}
}
if (sort_tasks_method == TASKBAR_SORT_POSITION) {
sort_tasks(event_taskbar);
}
}
else { // The event is on another taskbar than the task being dragged