Bug 442973 - Screen corner highlighting effect does not get triggered in some situations
Summary: Screen corner highlighting effect does not get triggered in some situations
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 5.22.90
Platform: Other Other
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-26 11:03 UTC by Kishore Gopalakrishnan
Modified: 2021-10-07 15:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23


Attachments
[OBSERVED RESULT B] A thin line near the bottom edge is skipped while highlighting the screen edge. (2.64 KB, image/png)
2021-09-26 11:03 UTC, Kishore Gopalakrishnan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2021-09-26 11:03:57 UTC
Created attachment 141919 [details]
[OBSERVED RESULT B] A thin line near the bottom edge is skipped while highlighting the screen edge.

SUMMARY
The 'Screen edge' highlighting effect is not triggered if one approaches a screen corner from a particular direction (see reproduction steps).

STEPS TO REPRODUCE
1.  In Settings > Workspace Behaviour > Screen edges, bind any action to the lower left corner of the screen
2. In Settings > Workspace Behaviour > Desktop effects, enable 'Screen Edge' and apply changes.
3. Bring your mouse to the bottom edge of the screen (somewhere in the middle, not near the corner)
4. Slowly move it to the bottom-left corner while hugging the bottom edge
5. When you reach close to the bottom-left corner, move the mouse slightly up
6. Move the mouse down again.

OBSERVED RESULT
A. The bottom-left screen corner is not highlighted after step 4, no matter how close one is to the bottom-left. The highlighting only comes into effect after step 5. The highlighting disappears again after step 6.
B. (Possibly related observation) When the bottom-left screen corner is highlighted, note that the highlight is vertically displaced upwards from the screen corner. See the attached image, where there is a thin un-highlighted area on the bottom edge.

EXPECTED RESULT
Screen highlighting should be activated properly no matter how one approaches the screen edge.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.90
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.10.63-1-lts (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx
Memory: 21.5 GiB of RAM
Graphics Processor: AMD Radeon™ Vega 8 Graphics

ADDITIONAL INFORMATION
A. Screen corner highlighting is only triggered consistently on the top-left corner on my machine. The bottom-left corner shows the behaviour described in this bug, while it seems to be impossible to actually get the two corners on the right to be highlighted.
B. The actual effect bound to the particular corner is always reliably triggered.
C. Also reproducible on KDE Neon unstable.
Comment 1 Andrey 2021-10-01 12:54:34 UTC
Happens on Wayland too
Comment 2 Andrey 2021-10-05 12:24:04 UTC
(In reply to Kishore Gopalakrishnan from comment #0)
> See the attached image, where there is a thin
> un-highlighted area on the bottom edge.
> 
Hmm, in my case it looks thicker. What is your DPI/Screen resolution?

> A. Screen corner highlighting is only triggered consistently on the top-left
> corner on my machine. The bottom-left corner shows the behaviour described
> in this bug, while it seems to be impossible to actually get the two corners
> on the right to be highlighted.

Could your report that also as it seems another bug?
Comment 3 Bug Janitor Service 2021-10-05 12:34:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1494
Comment 4 Kishore Gopalakrishnan 2021-10-05 14:04:20 UTC
(In reply to Andrey from comment #2)
> (In reply to Kishore Gopalakrishnan from comment #0)
> > See the attached image, where there is a thin
> > un-highlighted area on the bottom edge.
> > 
> Hmm, in my case it looks thicker. What is your DPI/Screen resolution?

Resolution is 1920x1080 (physical pixels), and I've set the scaling (in Settings > Monitors > Display configuration) to 150%. 

> > A. Screen corner highlighting is only triggered consistently on the top-left
> > corner on my machine. The bottom-left corner shows the behaviour described
> > in this bug, while it seems to be impossible to actually get the two corners
> > on the right to be highlighted.
> 
> Could your report that also as it seems another bug?

Sure.
Comment 5 Andrey 2021-10-05 14:35:22 UTC
Could you build KWin with the fix applied maybe?
Comment 6 Kishore Gopalakrishnan 2021-10-06 10:19:58 UTC
(In reply to Andrey from comment #5)
> Could you build KWin with the fix applied maybe?

Your fix leaves a very thin (it looks like one pixel) border on the bottom and right edges of the screen. If the mouse is on this border, the highlighting effect is not triggered. The top-left corner works perfectly as before.

This is on X11.
Comment 7 Andrey 2021-10-06 22:58:13 UTC
Git commit c9b41a1682b3f49054e177c6daff5cbddef341bc by Andrey Butirsky.
Committed on 06/10/2021 at 22:57.
Pushed by butirsky into branch 'master'.

fix wrong approach geometry of screen edge's effect

Edge geometry has width and height, so we need the correction for
approach geometry of bottom and right corners.
The other edges are fixed as well.

M  +19   -19   src/screenedge.cpp

https://invent.kde.org/plasma/kwin/commit/c9b41a1682b3f49054e177c6daff5cbddef341bc
Comment 8 Andrey 2021-10-06 23:00:25 UTC
Git commit bc6aaff63124b7925280d2b58b91365f4b55839a by Andrey Butirsky.
Committed on 06/10/2021 at 23:00.
Pushed by butirsky into branch 'Plasma/5.23'.

fix wrong approach geometry of screen edge's effect

Edge geometry has width and height, so we need the correction for
approach geometry of bottom and right corners.
The other edges are fixed as well.


(cherry picked from commit c9b41a1682b3f49054e177c6daff5cbddef341bc)

M  +19   -19   src/screenedge.cpp

https://invent.kde.org/plasma/kwin/commit/bc6aaff63124b7925280d2b58b91365f4b55839a
Comment 9 Andrey 2021-10-07 12:41:15 UTC
(In reply to Kishore Gopalakrishnan from comment #6)
> Your fix leaves a very thin (it looks like one pixel) border on the bottom
> and right edges of the screen.
Please re-test with the latest patch, it should work now. Thanks.
Comment 10 Kishore Gopalakrishnan 2021-10-07 12:48:35 UTC
(In reply to Andrey from comment #9)
> (In reply to Kishore Gopalakrishnan from comment #6)
> > Your fix leaves a very thin (it looks like one pixel) border on the bottom
> > and right edges of the screen.
> Please re-test with the latest patch, it should work now. Thanks.

It works perfectly now. Thanks!