Changeset View
Changeset View
Standalone View
Standalone View
kstyle/breezewindowmanager.cpp
Show First 20 Lines • Show All 439 Lines • ▼ Show 20 Line(s) | 125 | { | |||
---|---|---|---|---|---|
440 | } | 440 | } | ||
441 | 441 | | |||
442 | //_____________________________________________________________ | 442 | //_____________________________________________________________ | ||
443 | bool WindowManager::mousePressEvent( QObject* object, QEvent* event ) | 443 | bool WindowManager::mousePressEvent( QObject* object, QEvent* event ) | ||
444 | { | 444 | { | ||
445 | 445 | | |||
446 | // cast event and check buttons/modifiers | 446 | // cast event and check buttons/modifiers | ||
447 | auto mouseEvent = static_cast<QMouseEvent*>( event ); | 447 | auto mouseEvent = static_cast<QMouseEvent*>( event ); | ||
448 | if (mouseEvent->source() != Qt::MouseEventNotSynthesized) | ||||
449 | { return false; } | ||||
448 | if( !( mouseEvent->modifiers() == Qt::NoModifier && mouseEvent->button() == Qt::LeftButton ) ) | 450 | if( !( mouseEvent->modifiers() == Qt::NoModifier && mouseEvent->button() == Qt::LeftButton ) ) | ||
449 | { return false; } | 451 | { return false; } | ||
450 | 452 | | |||
451 | // check lock | 453 | // check lock | ||
452 | if( isLocked() ) return false; | 454 | if( isLocked() ) return false; | ||
453 | else setLocked( true ); | 455 | else setLocked( true ); | ||
454 | 456 | | |||
455 | #if BREEZE_HAVE_QTQUICK | 457 | #if BREEZE_HAVE_QTQUICK | ||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | 505 | { | |||
504 | 506 | | |||
505 | Q_UNUSED( object ); | 507 | Q_UNUSED( object ); | ||
506 | 508 | | |||
507 | // stop timer | 509 | // stop timer | ||
508 | if( _dragTimer.isActive() ) _dragTimer.stop(); | 510 | if( _dragTimer.isActive() ) _dragTimer.stop(); | ||
509 | 511 | | |||
510 | // cast event and check drag distance | 512 | // cast event and check drag distance | ||
511 | auto mouseEvent = static_cast<QMouseEvent*>( event ); | 513 | auto mouseEvent = static_cast<QMouseEvent*>( event ); | ||
514 | if (mouseEvent->source() != Qt::MouseEventNotSynthesized) | ||||
515 | { return false; } | ||||
512 | if( !_dragInProgress ) | 516 | if( !_dragInProgress ) | ||
513 | { | 517 | { | ||
514 | 518 | | |||
515 | if( _dragAboutToStart ) | 519 | if( _dragAboutToStart ) | ||
516 | { | 520 | { | ||
517 | if( mouseEvent->pos() == _dragPoint ) | 521 | if( mouseEvent->pos() == _dragPoint ) | ||
518 | { | 522 | { | ||
519 | // start timer, | 523 | // start timer, | ||
▲ Show 20 Lines • Show All 450 Lines • Show Last 20 Lines |