Bug 374447

Summary: Don't allow moving windows within the same Virtual Desktop using the Pager
Product: [Plasma] plasmashell Reporter: Chris Holland <zrenfire>
Component: Pager widgetAssignee: Eike Hein <hein>
Status: CONFIRMED ---    
Severity: wishlist CC: nate, notuxius, plasma-bugs-null
Priority: NOR Keywords: usability
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Chris Holland 2017-01-02 03:25:39 UTC
I release/drop the window on the same desktop when I want to "cancel" changing it's desktop. The default behaviour is to move the window. This should be optional.

Adding the value is easy, but I'm not 100% sure where it should be "checked". The easiest way would be to check if source == target desktop id in QML here:

https://github.com/KDE/plasma-desktop/blob/master/applets/pager/package/contents/ui/main.qml#L451

I'll probably add a if (pagerItem.desktopId != root.dragId) {...} around that locally for now,

but it looks like it will also perform the drag if the window is available on all desktops in the C++ model, so a new property probably needs to be added to pager model.

https://github.com/KDE/plasma-desktop/blob/master/applets/pager/plugin/pagermodel.cpp#L502
Comment 1 Eike Hein 2017-01-02 08:26:36 UTC
Seems to make more sense to me to allow the drag to be cancelled with ESC? I don't really like adding another option for something this trivial.
Comment 2 Chris Holland 2017-01-02 16:07:21 UTC
The pager is Mouse driven, please don't fix this with a keybinding.

I can write a patch in QML easily enough. It's just it would probably need the C++ property to do it right, which I haven't figured out how to compile and test.

If you don't think you'd merge a checkbox in the config, I won't add it to phabricator though.
Comment 3 Eike Hein 2017-01-03 06:22:58 UTC
How about we just disable window moving outright? Does anyone rely on moving their windows on a square centimeter Pager?
Comment 4 Alexander Mentyu 2018-02-21 13:31:30 UTC
Perhaps moving operation could be cancelled with right mouse click

Currently Esc button closes window that is moved

Also i'm suggesting to use middle mouse button - if window is moved with middle mouse button - it's not changing it's coordinates on current desktop - it only moves to other desktops if mouse hovers over them with middle mouse button pressed
Comment 5 Nate Graham 2022-06-25 17:05:25 UTC
(In reply to Eike Hein from comment #3)
> How about we just disable window moving outright? Does anyone rely on moving
> their windows on a square centimeter Pager?
That makes sense to me.