Don't drag windows in empty areas from touch/pen events
ClosedPublic

Authored by davidedmundson on Oct 4 2018, 12:51 PM.

Details

Summary

For a mouse users have the precision that if they clicked in an empty
area they want to perform some action.

For touch and tablets that isn't necessarily true.

From Boud in a kwin report: "The drag the window by empty areas is a
nasty one as well, especially when you're using a pen."

Change needs to happen in oxygen too

Test Plan

Moved window using sidebar of kate with mouse
Couldn't drag it with a pen

Diff Detail

Repository
R31 Breeze
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3486
Build 3504: arc lint + arc unit
davidedmundson created this revision.Oct 4 2018, 12:51 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 4 2018, 12:51 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Oct 4 2018, 12:51 PM
broulik accepted this revision.Oct 4 2018, 12:55 PM
This revision is now accepted and ready to land.Oct 4 2018, 12:55 PM
ngraham accepted this revision.Oct 4 2018, 4:37 PM
ngraham added subscribers: abalaji, ngraham.

Good idea. I know @abalaji was having trouble with this in D12162: Add support for touch scrolling in Dolphin.

This revision was automatically updated to reflect the committed changes.

Fails to build on Neon and Kubuntu CI

https://build.neon.kde.org/job/bionic_unstable_kde_breeze/71/

01:20:12 [ 94%] Building CXX object kstyle/CMakeFiles/breeze.dir/breezewindowmanager.cpp.o
01:20:12 kstyle/CMakeFiles/breeze.dir/build.make:982: recipe for target 'kstyle/CMakeFiles/breeze.dir/breezewindowmanager.cpp.o' failed
01:20:12 make[5]: Leaving directory '/workspace/build/build-qt4'
01:20:12 /workspace/build/kstyle/breezewindowmanager.cpp: In member function ‘bool Breeze::WindowManager::mousePressEvent(QObject*, QEvent*)’:
01:20:12 /workspace/build/kstyle/breezewindowmanager.cpp:448:25: error: ‘class QMouseEvent’ has no member named ‘source’
01:20:12 if (mouseEvent->source() != Qt::MouseEventNotSynthesized)
01:20:12 ^~~~~~
01:20:12 /workspace/build/kstyle/breezewindowmanager.cpp:448:41: error: ‘MouseEventNotSynthesized’ is not a member of ‘Qt’
01:20:12 if (mouseEvent->source() != Qt::MouseEventNotSynthesized)
01:20:12 ^~~~~~~~~~~~~~~~~~~~~~~~
01:20:12 /workspace/build/kstyle/breezewindowmanager.cpp: In member function ‘bool Breeze::WindowManager::mouseMoveEvent(QObject*, QEvent*)’:
01:20:12 /workspace/build/kstyle/breezewindowmanager.cpp:514:25: error: ‘class QMouseEvent’ has no member named ‘source’
01:20:12 if (mouseEvent->source() != Qt::MouseEventNotSynthesized)
01:20:12 ^~~~~~
01:20:12 /workspace/build/kstyle/breezewindowmanager.cpp:514:41: error: ‘MouseEventNotSynthesized’ is not a member of ‘Qt’
01:20:12 if (mouseEvent->source() != Qt::MouseEventNotSynthesized)
01:20:12 ^~~~~~~~~~~~~~~~~~~~~~~~
01:20:12 make[5]: * [kstyle/CMakeFiles/breeze.dir/breezewindowmanager.cpp.o] Error 1
01:20:12 make[5]:
* Waiting for unfinished jobs....

Probably needs an ifdef for KDE4

abetts added a subscriber: abetts.Oct 5 2018, 2:02 PM

Would this ensure that, at least, you can drag a window from the top area, like the toolbar, menu and the title bar empty areas?

No, not with a finger or pen. We should support this, yes, but not in the way it's currently done by synthesized mouse events.

abetts added a comment.Oct 5 2018, 2:04 PM

No, not with a finger or pen. We should support this, yes, but not in the way it's currently done by synthesized mouse events.

Sounds good! Thanks for the update!

abalaji added a comment.EditedOct 5 2018, 5:26 PM

@davidedmundson awesome! I've been running around in circles trying to find this, glad that you fixed it! Although in the future we should support this properly.