Check the dndEventDelay in Desktop Grid so that a click with moving does not move the window but activate the desktop.
BUG: 211041 svn path=/trunk/KDE/kdebase/workspace/; revision=1037445
This commit is contained in:
parent
c221426b5e
commit
e49064c356
2 changed files with 5 additions and 1 deletions
|
@ -33,6 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <netwm_def.h>
|
#include <netwm_def.h>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
#include <kglobalsettings.h>
|
||||||
|
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
@ -323,7 +324,8 @@ void DesktopGridEffect::windowInputMouseEvent( Window, QEvent* e )
|
||||||
if( e->type() == QEvent::MouseMove )
|
if( e->type() == QEvent::MouseMove )
|
||||||
{
|
{
|
||||||
int d = posToDesktop( me->pos());
|
int d = posToDesktop( me->pos());
|
||||||
if( windowMove != NULL )
|
if( windowMove != NULL &&
|
||||||
|
(me->pos() - dragStartPos).manhattanLength() > KGlobalSettings::dndEventDelay() )
|
||||||
{ // Handle window moving
|
{ // Handle window moving
|
||||||
if( !wasWindowMove ) // Activate on move
|
if( !wasWindowMove ) // Activate on move
|
||||||
effects->activateWindow( windowMove );
|
effects->activateWindow( windowMove );
|
||||||
|
@ -363,6 +365,7 @@ void DesktopGridEffect::windowInputMouseEvent( Window, QEvent* e )
|
||||||
if( me->buttons() == Qt::LeftButton )
|
if( me->buttons() == Qt::LeftButton )
|
||||||
{
|
{
|
||||||
// QRect rect;
|
// QRect rect;
|
||||||
|
dragStartPos = me->pos();
|
||||||
bool isDesktop = (me->modifiers() & Qt::ControlModifier);
|
bool isDesktop = (me->modifiers() & Qt::ControlModifier);
|
||||||
EffectWindow* w = isDesktop ? NULL : windowAt( me->pos());
|
EffectWindow* w = isDesktop ? NULL : windowAt( me->pos());
|
||||||
if ( w != NULL )
|
if ( w != NULL )
|
||||||
|
|
|
@ -86,6 +86,7 @@ class DesktopGridEffect
|
||||||
bool wasWindowMove, wasDesktopMove;
|
bool wasWindowMove, wasDesktopMove;
|
||||||
EffectWindow* windowMove;
|
EffectWindow* windowMove;
|
||||||
QPoint windowMoveDiff;
|
QPoint windowMoveDiff;
|
||||||
|
QPoint dragStartPos;
|
||||||
|
|
||||||
// Soft highlighting
|
// Soft highlighting
|
||||||
QList<TimeLine> hoverTimeline;
|
QList<TimeLine> hoverTimeline;
|
||||||
|
|
Loading…
Reference in a new issue