Bug 383797 - Broken Fitt's Law for TopLeft Edge
Summary: Broken Fitt's Law for TopLeft Edge
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.10.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D7508
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-21 15:43 UTC by Michail Vourlakos
Modified: 2017-08-24 13:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.11
Sentry Crash Report:
mgraesslin: Wayland-
mgraesslin: X11+
mgraesslin: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michail Vourlakos 2017-08-21 15:43:01 UTC
Fitt's Law is not followed for the TopLeft Edge of the screen in my system,

1. add a top panel that contains an app launcher at its far left
2. disable all kwin effects for the topleft corner
3. clicking at the far left of the app launcher or at the far top there is no problem but if you click at the TopLeft corner the pop up is not appearing


I noticed that if the user enables a kwin effect(action) then clicking at the top left corner activates the pop up BUT in such case I think this behavior works because the mouse is not able to reach that far inside the top left corner(probably a kwin protection? I cant be sure...)

tip: exactly same behavior is observed also with Latte
Comment 1 Kai Uwe Broulik 2017-08-23 09:16:06 UTC
I experience the same, I cannot click the top left pixel of the screen, no screen edge assigned.
Comment 2 Martin Flöser 2017-08-23 10:01:08 UTC
please xprop and xwininfo the top left corner.
Comment 3 Michail Vourlakos 2017-08-23 17:03:50 UTC
xprop
----
XdndAware(ATOM) = ATOM


xwininfo
----
xwininfo: Window id: 0x2400019 (has no name)

  Absolute upper-left X:  0
  Absolute upper-left Y:  0
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1
  Height: 1
  Depth: 0
  Visual: 0x8b
  Visual Class: TrueColor
  Border width: 0
  Class: InputOnly
  Colormap: 0x0 (not installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: yes
  Corners:  +0+0  -2559+0  -2559-1439  +0-1439
  -geometry 1x1+0+0
Comment 4 Martin Flöser 2017-08-23 17:34:03 UTC
meh it misses the information which application it is. Can you please do in addition a:
xwininfo -tree -root

and check to which process the window belongs? If I check in my XWayland session I see lots of such window belonging to several applications. Looks like that is an often used position.
Comment 5 Martin Flöser 2017-08-23 17:36:40 UTC
maybe also a 
xwininfo -all
Comment 6 Kai Uwe Broulik 2017-08-23 18:22:02 UTC
How do I find out what process it belongs to? xwininfo -tree -root shows:

xwininfo: Window id: 0xeb (the root window) (has no name)

  Root window id: 0xeb (the root window) (has no name)
  Parent window id: 0x0 (none)
     98 children:
    [...]
     0x3e00004 (has no name): ()  1x1+0+0  +0+0
     0x4000003 (has no name): ()  3x3+0+0  +0+0
     0x3e00003 (has no name): ()  3x3+0+0  +0+0
     0x2600004 (has no name): ()  1x1+0+0  +0+0
     0x3800003 (has no name): ()  3x3+0+0  +0+0
     0x1400003 (has no name): ()  3x3+0+0  +0+0
     0x2c00005 (has no name): ()  1x1+0+0  +0+0
     0x2c00004 (has no name): ()  1x1+0+0  +0+0
     0x3400002 (has no name): ()  1x1+0+0  +0+0
     0x1000004 (has no name): ()  1x1+0+0  +0+0
     0x3000004 (has no name): ()  1x1+0+0  +0+0
     0x2600003 (has no name): ()  3x3+0+0  +0+0
     0x3000003 (has no name): ()  3x3+0+0  +0+0
     0x2c00003 (has no name): ()  3x3+0+0  +0+0
     0x2200003 (has no name): ()  3x3+0+0  +0+0
     0x2800003 (has no name): ()  3x3+0+0  +0+0
     0x2000003 (has no name): ()  3x3+0+0  +0+0
     0x1a00004 (has no name): ()  1x1+0+0  +0+0
     0x1600004 (has no name): ()  1x1+0+0  +0+0
     0x1c00003 (has no name): ()  3x3+0+0  +0+0
     0x1a00003 (has no name): ()  3x3+0+0  +0+0
     0x1600003 (has no name): ()  3x3+0+0  +0+0
     0xe00001 (has no name): ()  1x1+0+0  +0+0
     0x1000003 (has no name): ()  3x3+0+0  +0+0
     0xc00003 (has no name): ()  3x3+0+0  +0+0
     0x200001 (has no name): ()  10x10+-20+-20  +-20+-20
     0x2600007 "KWin": ()  1x1+0+0  +0+0
     0x2600024 (has no name): ()  1x1+0+0  +0+0 ← THAT was the window I clicked on
     0x2600022 (has no name): ()  1x1+0+1439  +0+1439
     0x2600023 (has no name): ()  74x74+0+1366  +0+1366
     0x2600012 (has no name): ()  1x1+2559+1439  +2559+1439
    [...]

It goes away when I quit kwin_x11 and when I restart it, a new window appears in xwininfo -tree -root with another ID but it's placed right below "KWin" in the output
Comment 7 Kai Uwe Broulik 2017-08-23 18:22:57 UTC
xwininfo -all
(note that I restarted kwin in the meantime so the winid is a different to my previous comment)

xwininfo: Window id: 0x2600048 (has no name)

  Root window id: 0xeb (the root window) (has no name)
  Parent window id: 0xeb (the root window) (has no name)
     0 children.

  Absolute upper-left X:  0
  Absolute upper-left Y:  0
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1
  Height: 1
  Depth: 0
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOnly
  Colormap: 0x0 (not installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: yes
  Corners:  +0+0  -2559+0  -2559-1439  +0-1439
  -geometry 1x1+0+0

  Bit gravity: ForgetGravity
  Window gravity: NorthWestGravity
  Backing-store hint: NotUseful
  Backing-planes to be preserved: 0xffffffff
  Backing pixel: 0
  Save-unders: No

  Someone wants these events:
      EnterWindow
      LeaveWindow
      PointerMotion
  Do not propagate these events:
  Override redirection?: Yes

  No window manager hints defined
  Window manager hints:
      Process id: (unknown)

  No normal window size hints defined
  No zoom window size hints defined

  No window shape defined
  No border shape defined
Comment 8 Michail Vourlakos 2017-08-23 18:29:02 UTC
same outputs here and I can also confirm that I used:

kquitapp plasmashell
and killed also kwin_x11

the mentioned info appear only when kwin is running
Comment 9 Martin Flöser 2017-08-24 08:51:54 UTC
Given what you two write it might be the screen edge window. But that one should be destroyed when no action references it.
Comment 10 Kai Uwe Broulik 2017-08-24 09:21:50 UTC
I traced it back to PresentWindowsEffect::reconfigure() which does registerTouchBorder with EdgeTopLeft and that ends up creating an edge window.

I have no idea why my kwinrc is littered with TouchBorderActivate=[some number] in various effects.
Comment 11 Martin Flöser 2017-08-24 10:12:32 UTC
(In reply to Kai Uwe Broulik from comment #10)
> I traced it back to PresentWindowsEffect::reconfigure() which does
> registerTouchBorder with EdgeTopLeft and that ends up creating an edge
> window.

That sounds wrong.

> 
> I have no idea why my kwinrc is littered with TouchBorderActivate=[some
> number] in various effects.
Nod, normal. It should be 9 which means none.
Comment 12 Martin Flöser 2017-08-24 11:40:09 UTC
Possible patch at: https://phabricator.kde.org/D7508

I don't really understand how you ended up with an incorrect config. This should not be possible. My only explanation is that a version in master prior to 5.10 had a bug which could result in an incorrect config.
Comment 13 Martin Flöser 2017-08-24 13:57:27 UTC
Git commit 981662a6b5e00a4fc01e264e79437a63344e5432 by Martin Flöser.
Committed on 24/08/2017 at 11:38.
Pushed by graesslin into branch 'master'.

[effects] Don't register touch edges which don't exist

Summary:
Apparently some old configs made PresentWindows register the top left
corner which does not make any sense as that's not supported by touch.
So to be sure, don't register those edges.
FIXED-IN: 5.11

Test Plan: Not tested, I'm on Wayland

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

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

M  +4    -1    effects/cube/cube.cpp
M  +3    -0    effects/desktopgrid/desktopgrid.cpp
M  +4    -1    effects/presentwindows/presentwindows.cpp

https://commits.kde.org/kwin/981662a6b5e00a4fc01e264e79437a63344e5432