Bug 362860 - kwin missing setting for wheel event and double click, on the frame
Summary: kwin missing setting for wheel event and double click, on the frame
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (other bugs)
Version First Reported In: 5.5.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D1596
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-09 17:50 UTC by Allan
Modified: 2016-05-12 15:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.7.0
Sentry Crash Report:
mgraesslin: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allan 2016-05-09 17:50:23 UTC
Top edge of window need to get wheel and doubleclick events.

- Especially with windows aligned with the top edge of the screen, just throwing the mouse up there to quickly shade a window with scroll assigned to shade - is not so quick anymore since you need to move down a bit away from the frame and into the title area.

This is a regression since kde 4.

Reproducible: Always

Steps to Reproduce:
1. Setup shade on titlebar wheel event
2. Align a window with top screen edge
3. Throw the mouse at the top edge and scroll

Actual Results:  
Nothing happens.
(Same with doubleclick event.)

Expected Results:  
Scroll event set up with titlebar should shade the window.

I even tried a workaround - to set "no frame/border" - in order to make this useful.. Same depressing result.

Coming from KDE 4: This, and lack of window tabbing; are major regressions.
Comment 1 Thomas Lübking 2016-05-09 18:33:34 UTC
Which decoration in particular (breeze or some aurorae theme)?
In doubt attach the output of "qdbus org.kde.KWin /KWin supportInformation".
Comment 2 Allan 2016-05-09 19:43:21 UTC
(In reply to Thomas Lübking from comment #1)
> Which decoration in particular (breeze or some aurorae theme)?
> In doubt attach the output of "qdbus org.kde.KWin /KWin supportInformation".

Breeze is used.
Comment 3 Thomas Lübking 2016-05-10 05:39:16 UTC
@Hugo, do you intercept wheel events on the edges?
Comment 4 Allan 2016-05-10 15:58:24 UTC
You don't need to align it with the top of the screen - that is just my typical use case because then you can just throw the mouse at that infinitely tall space - makes it easy to hit and use.

In KDE5 unlike in KDE4, you can only scroll/doubleclick at the titlebar, but not at the titlebar border regardless if you disabled borders entirely, and regardless where the window is on the screen.
Comment 5 Hugo Pereira Da Costa 2016-05-10 16:04:02 UTC
(In reply to Thomas Lübking from comment #3)
> @Hugo, do you intercept wheel events on the edges?

Nope. No event interception whatsoever in breeze decoration.
Comment 6 Martin Flöser 2016-05-12 06:41:23 UTC
Unit test in KWin confirms the problem. Will investigate.
Comment 7 Martin Flöser 2016-05-12 07:00:40 UTC
The reason is that we check the titleBar rect:
        if (orientation == Qt::Vertical && decoration->decoration()->titleBar().contains(localPos.toPoint())) {
            decoration->client()->performMouseCommand(options->operationTitlebarMouseWheel(delta * -1),
                                                        event->globalPosF().toPoint());
        }

The top most pixel is not part of the title bar, so the event doesn't get processed. Changing this in Breeze causes other breakage, so that's something to fix in KWin.
Comment 8 Martin Flöser 2016-05-12 08:38:49 UTC
Possible patch in https://phabricator.kde.org/D1596 - targeting next feature version as it changes behavior.
Comment 9 Martin Flöser 2016-05-12 15:00:32 UTC
Git commit 14d12c05855adb42fb572ad1c41ba2c2547765f4 by Martin Gräßlin.
Committed on 12/05/2016 at 14:58.
Pushed by graesslin into branch 'master'.

Do not limit mouse actions to titleBarArea but allow on complete titleBarPosition

Summary:
Mouse actions like wheel and double click were restricted to the titleBar
area. This made the top most pixel non-interactive as it's not part of the
titleBarArea.

This change makes the complete titlebarPosition interactive. That is it
includes for a "normal" (top) setup also the TopLeft/Top/Right section.
Thus the top most pixel can be double clicked, mouse wheeled, etc.

For the Wayland case the test case is adjusted.
FIXED-IN: 5.7.0

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

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

M  +27   -2    abstract_client.cpp
M  +1    -0    abstract_client.h
M  +54   -0    autotests/wayland/decoration_input_test.cpp
M  +2    -2    events.cpp
M  +1    -1    input.cpp

http://commits.kde.org/kwin/14d12c05855adb42fb572ad1c41ba2c2547765f4