Bug 481282 - Screen edge effect does not correspond with actual length of edge that can be triggered
Summary: Screen edge effect does not correspond with actual length of edge that can be...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-13 01:43 UTC by fanzhuyifan
Modified: 2024-02-17 00:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments
video (134.92 KB, video/webm)
2024-02-13 01:43 UTC, fanzhuyifan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fanzhuyifan 2024-02-13 01:43:00 UTC
Created attachment 165793 [details]
video

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Enable screen edge effect
2. Make a auto-hide panel
3. Approach panel with cursor

OBSERVED RESULT
Noted that the highlighted effect is shorter than the actual panel, and shorter than the screen edge that can be triggered.

EXPECTED RESULT
The highlight effect should correspond exactly with the part of the screen edge that can be triggered.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2024-02-13 03:11:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5179
Comment 2 fanzhuyifan 2024-02-13 15:40:28 UTC
Git commit 2f4db693e3c826be7ac76629364630276e65bc25 by Yifan Zhu.
Committed on 13/02/2024 at 15:30.
Pushed by fanzhuyifan into branch 'master'.

screenedge: don't reduce approachGeometry

Reducing approachGeometry is not needed.

During edge creation, createHorizontalEdge and createVerticalEdge
already substract the needed cornerOffset, and edges reserved by client
windows shouldn't be reduced in geometry.
In addition, during display, ScreenEdgeEffect confines the painted area
to approachGeometry. So approachGeometry shouldn't be reduced in
advance.

M  +0    -8    src/screenedge.cpp

https://invent.kde.org/plasma/kwin/-/commit/2f4db693e3c826be7ac76629364630276e65bc25
Comment 3 fanzhuyifan 2024-02-13 15:50:11 UTC
Git commit 4727a7d956318086c4456d8ade3a22803eb8ff47 by Yifan Zhu.
Committed on 13/02/2024 at 15:41.
Pushed by fanzhuyifan into branch 'Plasma/6.0'.

screenedge: don't reduce approachGeometry

Reducing approachGeometry is not needed.

During edge creation, createHorizontalEdge and createVerticalEdge
already substract the needed cornerOffset, and edges reserved by client
windows shouldn't be reduced in geometry.
In addition, during display, ScreenEdgeEffect confines the painted area
to approachGeometry. So approachGeometry shouldn't be reduced in
advance.


(cherry picked from commit 2f4db693e3c826be7ac76629364630276e65bc25)

M  +0    -8    src/screenedge.cpp

https://invent.kde.org/plasma/kwin/-/commit/4727a7d956318086c4456d8ade3a22803eb8ff47
Comment 4 Nate Graham 2024-02-17 00:18:20 UTC
Sort of mutually exclusive with Bug 464856; maybe we should mark that as INTENTIONAL? Or change this around to implement that, rather than this?
Comment 5 fanzhuyifan 2024-02-17 00:25:13 UTC
(In reply to Nate Graham from comment #4)
> Sort of mutually exclusive with Bug 464856; maybe we should mark that as
> INTENTIONAL? Or change this around to implement that, rather than this?

I don't think it is mutually exclusive -- we can just make the panel reserve the whole edge and we could solve both issues. The  commit fixing this was only about the visual effect code, and making it consistent with what was requested.
Comment 6 Nate Graham 2024-02-17 00:27:06 UTC
I see, cool.
Comment 7 fanzhuyifan 2024-02-17 00:28:09 UTC
(In reply to Nate Graham from comment #4)
> Sort of mutually exclusive with Bug 464856; maybe we should mark that as
> INTENTIONAL? Or change this around to implement that, rather than this?

Oh do you mean in that case we would want the edge trigger effect to only highlight the panel, but make the edge trigger everywhere? That would require deeper changes to the current code I think.
Comment 8 Nate Graham 2024-02-17 00:29:23 UTC
My thinking would be that the entire screen edge would both highlight visually and also act as a triggering area. So the visual effect would match the triggering area, not the panel width.