Bug 381849 - [since kwin 5.10.3] Faulty blue glow when moving mousepointer to screen edge
Summary: [since kwin 5.10.3] Faulty blue glow when moving mousepointer to screen edge
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.10.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D6467
Keywords: regression
Depends on:
Blocks:
 
Reported: 2017-07-01 07:38 UTC by Stefan L
Modified: 2017-07-06 17:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.10.4
mgraesslin: Wayland-
mgraesslin: X11+
mgraesslin: ReviewRequest+


Attachments
Screenshot showing the issue (top and bottom edge) (887.88 KB, image/png)
2017-07-01 07:38 UTC, Stefan L
Details
Screencast demonstration of the bug (1.29 MB, video/x-matroska)
2017-07-01 07:41 UTC, Stefan L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan L 2017-07-01 07:38:26 UTC
Created attachment 106397 [details]
Screenshot showing the issue (top and bottom edge)

Summary:
---------
Since kwin-x11 v5.10.3 I experience a faulty blue glow when moving the mousepointer to the screen edge. This happens although I set "Switch desktop on edge" to "Only When Moving Windows". Depending on how fast I drag the mousepointer away from the edge, the blue glow sometimes stays there.

Steps to Reproduce:
--------------------
1. Set "Switch desktop on edge" to "Only When Moving Windows"
2. Open an arbitrary window
3. Maximize the window by dragging it to the top screen edge.
    - it is sufficient to move it to the screen edge without triggering a maximize.
    - You can also move it to any other screen edge

What I expect to happen:
-------------------------
The edge should glow up shortly (because I might want to move the window) but then the blue glow should disappear.

What actually happens:
-----------------------
The blue glow keeps getting triggered even when I release the window.
Sometimes a "shadow" of the glow remains even when the mousepointer is not near the edge anymore.

Further Details:
-----------------
- This happens since kwin_x11 v5.10.3
- OS: KDE Neon 5.10.3
- Maybe related to https://bugs.kde.org/show_bug.cgi?id=380440
Comment 1 Stefan L 2017-07-01 07:41:35 UTC
Created attachment 106398 [details]
Screencast demonstration of the bug
Comment 2 Martin Flöser 2017-07-01 08:57:23 UTC
damn I hoped I was having a broken setup.
Comment 3 S. Christian Collins 2017-07-02 04:23:48 UTC
I am running into this problem as well on both of my systems running Plasma desktop 5.10.3 (KDE neon). A workaround for now is to disable the "Screen Edge" effect in System Settings -> Desktop Behavior -> Desktop Effects. Screen edge triggers will still work, but the blue glow will be disabled.
Comment 4 Martin Flöser 2017-07-02 11:47:25 UTC
Patch at https://phabricator.kde.org/D6467 - if you have a chance please test the patch. I don't want to introduce yet another regression.
Comment 5 Stefan L 2017-07-02 20:00:46 UTC
I recompiled kwin-x11 (5.10.3-0neon+16.04+xenial+build58) with your patch applied.
It fixes the issue. Thanks a lot!

If I notice any further bug/regression, I will report it.
Comment 6 Martin Flöser 2017-07-03 04:21:00 UTC
The bug will be fixed when the patch gets pushed.
Comment 7 Martin Flöser 2017-07-06 17:12:58 UTC
Git commit 4e9456a857234fe7884cae6aa1cec93093fdf525 by Martin Flöser.
Committed on 06/07/2017 at 17:12.
Pushed by graesslin into branch 'Plasma/5.10'.

[platforms/x11] Fix incorrect screen edge approaching with switch desktop on window move

Summary:
There is a regression in WindowBasedEdge::soStopApproaching. Due to
only operate when the edge activates for pointer it is possible that
the cursor polling stays active. Explaining the situation:

1. Activate switch desktop when moving window
2. Start moving a window
3. Move mouse into the approach geometry
-> doStartApproaching activates as we are moving a window
4. stop moving window
-> doStopApproaching early exits as the position does not activate for
   pointer any more - we are not moving a window
-> cursor polling is still connected and whenever mouse enters edge
   approaching is started

The analysis shows that the check whether activates for pointer is wrong
in the case of stop approaching. If the edge started to approach, we also
need to stop approaching.

This change addresses the problem by turning the check into whether the
connection for cursor position update is set.

This is the third bug fix to the X11 screen edge handling after
introducing touch screen edges. This needs more manual testing by
everybody in the Plasma team who is still using X11.
FIXED-IN: 5.10.4

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6467

M  +7    -5    plugins/platforms/x11/standalone/edge.cpp
M  +1    -0    plugins/platforms/x11/standalone/edge.h

https://commits.kde.org/kwin/4e9456a857234fe7884cae6aa1cec93093fdf525