Bug 310475 - Drag and drop not working properly in pager.
Summary: Drag and drop not working properly in pager.
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Unmaintained
Component: widget-pager (show other bugs)
Version: 4.9.90 Beta2
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-22 04:06 UTC by leo_rockway
Modified: 2012-12-23 03:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Fixes dragging windows in pager (813 bytes, patch)
2012-12-16 22:05 UTC, Fabian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description leo_rockway 2012-11-22 04:06:05 UTC
Dragging and dropping applications to the bottom row when having the pager have 2 rows doesn't work.

I'm actually not on KDE-git but on KDE Development Platform: 4.9.80 (I'm using Arch's kde-unstable) but the option wasn't available when writing this bug report.

Reproducible: Always

Steps to Reproduce:
1. Configure the Pager to have 2 rows and to show applications' icons.
2. Drag an application from one desktop to the other, using the pager.
Actual Results:  
Dragging and dropping only works on the top row. It's impossible to drag from the top row to the bottom row. It's also impossible to drag from the bottom row to another desktop in the bottom row (only to top row).

Expected Results:  
Dragging and dropping from any desktop to any other desktop.

Dragging and dropping using the task manager (traditional or icon-only) and the pager doesn't work at all. It's probably related, but I can open a new bug report if needed.
Comment 1 Fabian 2012-12-02 19:46:31 UTC
I can confirm this on Chakra linux, also using beta 1. There is also a dublicate bug report at https://bugs.kde.org/show_bug.cgi?id=310758 .
Comment 2 Fabian 2012-12-08 15:19:05 UTC
After doing some testing, I'd say that line 136  in packages/contents/ui/main.qml
drag.maximumY: root.height - 2*windowRect.height
doesn't work, whereas it does work for root.height - windowRect.height (or 0.9 *windowRect.height)

What was the idea behind the 2? I've tested in both vertical and horicontal panel mode, and it didn't work for me, whereas the change fixes/ works around it.
Comment 3 Fabian 2012-12-08 19:49:59 UTC
For your information, this also happens with beta 2.
Comment 4 Nikolay Rysev 2012-12-13 12:45:08 UTC
Dragging doesn't work also if desktops are in one row (f.ex., 1x4).
4.9.90

(In reply to comment #2)
> After doing some testing, I'd say that line 136  in packages/contents/ui/main.qml
> drag.maximumY: root.height - 2*windowRect.height
> doesn't work, whereas it does work for root.height - windowRect.height (or 0.9 *windowRect.height)

Big thanks to you, Fabian! It works!

PS: I think that windowRect.width and windowRect.height properties must be the same as in clipRect (for now, when you dragging a window, it rect is bigger than parent).
Comment 5 Fabian 2012-12-16 22:05:02 UTC
Created attachment 75874 [details]
Fixes dragging windows in pager

This fixes a regression introduced with a990c98b2b3e6aceda8904f8ff36a03db533fbe6, (Reducing the drag area), which limited the drag area too much. Using 1 * windowRect.height (or simply windowRect.height)  should also work, but (maybe only for me!) it seemed to work better (from a usability POV) when one is allowed to move the window a little bit more. Note that this doesn't adress the issue mentioned in the last post by Nikolay about windowRect's size.
Comment 6 Weng Xuetian 2012-12-23 02:01:24 UTC
Git commit 64a17885b22a13ae73e2a89d0e29216a5cf2b481 by Weng Xuetian.
Committed on 22/12/2012 at 12:48.
Pushed by xuetianweng into branch 'KDE/4.10'.

Fix pager window dragging and icon

the draggable region calculate for X and Y axis should use the same
algorithm. width +/- rectwidth/2
REVIEW: 107828

M  +3    -3    plasma/desktop/applets/pager/package/contents/ui/main.qml

http://commits.kde.org/kde-workspace/64a17885b22a13ae73e2a89d0e29216a5cf2b481
Comment 7 Weng Xuetian 2012-12-23 03:29:13 UTC
Git commit 9fef7c1caf16ed19dfb56c98ace417be80787801 by Weng Xuetian.
Committed on 23/12/2012 at 04:27.
Pushed by xuetianweng into branch 'KDE/4.10'.

port drag switch/drop window feature to qml
REVIEW: 107843

M  +31   -0    plasma/desktop/applets/pager/package/contents/ui/main.qml
M  +14   -0    plasma/desktop/applets/pager/pager.cpp
M  +1    -0    plasma/desktop/applets/pager/pager.h

http://commits.kde.org/kde-workspace/9fef7c1caf16ed19dfb56c98ace417be80787801