From 3df12cd87674fdfbc2afa21584e1f3e558fa873b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 13 Apr 2013 15:00:04 -0500 Subject: Add menu items to rearrange taskbar entries Make taskbar drag and drop moving more robust This resolves Bug 1103 --- kicker/taskbar/taskbarcontainer.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'kicker/taskbar/taskbarcontainer.cpp') diff --git a/kicker/taskbar/taskbarcontainer.cpp b/kicker/taskbar/taskbarcontainer.cpp index 030a565dc..fa105de15 100644 --- a/kicker/taskbar/taskbarcontainer.cpp +++ b/kicker/taskbar/taskbarcontainer.cpp @@ -338,11 +338,9 @@ void TaskBarContainer::dragEnterEvent( TQDragEnterEvent* e ) return; } - if (TaskDrag::canDecode(e) && READ_MERGED_TASBKAR_SETTING(allowDragAndDropReArrange)) + if ((e->source()->parent() == taskBar->viewport()) && TaskDrag::canDecode(e) && READ_MERGED_TASBKAR_SETTING(allowDragAndDropReArrange) && (!READ_MERGED_TASBKAR_SETTING(sortByApp))) { - if (!READ_MERGED_TASBKAR_SETTING(sortByApp)) { - e->accept(); - } + e->accept(); } } @@ -359,12 +357,10 @@ void TaskBarContainer::dropEvent( TQDropEvent* e ) return; } - if (TaskDrag::canDecode(e) && READ_MERGED_TASBKAR_SETTING(allowDragAndDropReArrange)) + if ((e->source()->parent() == taskBar->viewport()) && TaskDrag::canDecode(e) && READ_MERGED_TASBKAR_SETTING(allowDragAndDropReArrange) && (!READ_MERGED_TASBKAR_SETTING(sortByApp))) { - if (!READ_MERGED_TASBKAR_SETTING(sortByApp)) { - if (taskBar->taskMoveHandler(taskBar->mapFrom(this, e->pos()), TaskDrag::decode(e))) { - e->accept(); - } + if (taskBar->taskMoveHandler(TaskMoveDestination::Position, TaskDrag::decode(e), taskBar->mapFrom(this, e->pos()))) { + e->accept(); } } } \ No newline at end of file -- cgit v1.2.1