Bug 495047 - With panel on left screen edge, right-clicking immediately next to it and creating a file places the file one cell over to the right of where it should have been placed
Summary: With panel on left screen edge, right-clicking immediately next to it and cre...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop icons & Folder View widget (other bugs)
Version First Reported In: 6.3.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-10-19 15:04 UTC by Fernando M. Muniz
Modified: 2025-08-09 04:48 UTC (History)
3 users (show)

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


Attachments
Wrong placement. (1.93 MB, video/x-matroska)
2024-10-19 15:04 UTC, Fernando M. Muniz
Details
Wrong placement. (1.36 MB, video/x-matroska)
2024-10-19 19:46 UTC, Fernando M. Muniz
Details
Issue on Plasma 6.3.0 (1.36 MB, video/mp4)
2025-02-14 08:48 UTC, Fernando M. Muniz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando M. Muniz 2024-10-19 15:04:47 UTC
Created attachment 175027 [details]
Wrong placement.

I Right-Clicked on the first space on the top-left corner of the screen, but the system created the file on the second space.
Comment 1 Fernando M. Muniz 2024-10-19 19:46:54 UTC
Created attachment 175033 [details]
Wrong placement.
Comment 2 Nate Graham 2024-11-05 19:38:17 UTC
Can reproduce the issue on current git master, but not with https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2607 applied. Looks like that fixes it!
Comment 3 Akseli Lahtinen 2024-11-06 16:30:57 UTC
Git commit cc44615b34dacc2a4acfdc82de885c943318a7f6 by Akseli Lahtinen.
Committed on 06/11/2024 at 16:30.
Pushed by akselmo into branch 'master'.

Refactor icon positioner saving and loading

The icon positioner saving and loading is handled by QML, which makes it a bit difficult
to work with the logic in positioner CPP files.

This change does the following:
- Explicitly save only on user interactions
- Moved the save and load of config to positioner.cpp
  - Easier debugging of the saving and loading functions
  - Still uses the JSON style of save/loading like the old one
    - Technically should be compatible with the old config, which was also JSON.
- Makes positionerApplet accessible from FolderView qml
- Various checks for checking if screen is enabled or not to avoid doing unnecessary work when screen is off
- A lot of fixes to avoid any racing conditions
- Removed any timers
- Added various unit tests

Alternative to https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2603
Related: bug 482875, bug 494874, bug 472137, bug 433867, bug 494412, bug 468619, bug 449069, bug 453314
FIXED-IN: 6.3.0

M  +1    -1    containments/desktop/package/contents/ui/FolderView.qml
M  +1    -48   containments/desktop/package/contents/ui/FolderViewLayer.qml
M  +165  -26   containments/desktop/plugins/folder/autotests/positionertest.cpp
M  +18   -3    containments/desktop/plugins/folder/autotests/positionertest.h
M  +23   -7    containments/desktop/plugins/folder/foldermodel.cpp
M  +5    -0    containments/desktop/plugins/folder/foldermodel.h
M  +176  -60   containments/desktop/plugins/folder/positioner.cpp
M  +37   -8    containments/desktop/plugins/folder/positioner.h

https://invent.kde.org/plasma/plasma-desktop/-/commit/cc44615b34dacc2a4acfdc82de885c943318a7f6
Comment 4 Fernando M. Muniz 2025-02-14 08:48:54 UTC
Created attachment 178346 [details]
Issue on Plasma 6.3.0
Comment 5 Nate Graham 2025-02-18 03:45:35 UTC
Darn, I can reproduce it again too. :(
Comment 6 Fernando M. Muniz 2025-08-05 20:19:32 UTC
Removed 6.3.0 from "Version Fixed In:" since it wasn't.
Comment 7 Bug Janitor Service 2025-08-06 13:54:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3144
Comment 8 Akseli Lahtinen 2025-08-08 08:11:04 UTC
Git commit fb377854725d54378bdf1466e21ae560fe106a85 by Akseli Lahtinen.
Committed on 08/08/2025 at 07:57.
Pushed by akselmo into branch 'master'.

FolderModel: Use availableRelativeScreenRect instead of screenGeometry

Screengeometry takes into account the whole screen, so when user tries
to create a new item in position that maps into position that has panel
in it, it will be created slightly away from it.

This changes that we use availableRelativeScreenRect, which already
knows about the panels. This way the mapping is more reliable.

M  +8    -2    containments/desktop/plugins/folder/foldermodel.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/fb377854725d54378bdf1466e21ae560fe106a85
Comment 9 Akseli Lahtinen 2025-08-08 19:56:31 UTC
Git commit 1e8c4158146ab62605f5896d58d256fbf2ff218c by Akseli Lahtinen.
Committed on 08/08/2025 at 08:30.
Pushed by akselmo into branch 'Plasma/6.4'.

FolderModel: Use availableRelativeScreenRect instead of screenGeometry

Screengeometry takes into account the whole screen, so when user tries
to create a new item in position that maps into position that has panel
in it, it will be created slightly away from it.

This changes that we use availableRelativeScreenRect, which already
knows about the panels. This way the mapping is more reliable.
(cherry picked from commit fb377854725d54378bdf1466e21ae560fe106a85)

M  +8    -2    containments/desktop/plugins/folder/foldermodel.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/1e8c4158146ab62605f5896d58d256fbf2ff218c