Commit fb0cbedc authored by David Edmundson's avatar David Edmundson

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

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

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15942
parent 63207819
......@@ -445,6 +445,8 @@ namespace Breeze
// cast event and check buttons/modifiers
auto mouseEvent = static_cast<QMouseEvent*>( event );
if (mouseEvent->source() != Qt::MouseEventNotSynthesized)
{ return false; }
if( !( mouseEvent->modifiers() == Qt::NoModifier && mouseEvent->button() == Qt::LeftButton ) )
{ return false; }
......@@ -509,6 +511,8 @@ namespace Breeze
// cast event and check drag distance
auto mouseEvent = static_cast<QMouseEvent*>( event );
if (mouseEvent->source() != Qt::MouseEventNotSynthesized)
{ return false; }
if( !_dragInProgress )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment