KGlobalSettings::dndEventDelay() -> QApplication::startDragDistance()

remotes/origin/Plasma/5.0
Martin Gräßlin 13 years ago
parent 58eaa61d25
commit 211682ab67
  1. 6
      effects/desktopgrid/desktopgrid.cpp
  2. 3
      effects/presentwindows/presentwindows.cpp
  3. 3
      geometry.cpp

@ -29,6 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <math.h>
#include <QAction>
#include <QApplication>
#include <kactioncollection.h>
#include <QDebug>
#include <KDE/KGlobalAccel>
@ -36,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <netwm_def.h>
#include <QEvent>
#include <QMouseEvent>
#include <kglobalsettings.h>
#include <QtGui/QVector2D>
#include <QQmlContext>
#include <QQmlEngine>
@ -483,7 +483,7 @@ void DesktopGridEffect::windowInputMouseEvent(QEvent* e)
if (e->type() == QEvent::MouseMove) {
int d = posToDesktop(me->pos());
if (windowMove != NULL &&
(me->pos() - dragStartPos).manhattanLength() > KGlobalSettings::dndEventDelay()) {
(me->pos() - dragStartPos).manhattanLength() > QApplication::startDragDistance()) {
// Handle window moving
if (!wasWindowMove) { // Activate on move
if (isUsingPresentWindows() && windowMove->isOnAllDesktops()) {
@ -536,7 +536,7 @@ void DesktopGridEffect::windowInputMouseEvent(QEvent* e)
}
effects->addRepaintFull();
} else if ((me->buttons() & Qt::LeftButton) && !wasDesktopMove &&
(me->pos() - dragStartPos).manhattanLength() > KGlobalSettings::dndEventDelay()) {
(me->pos() - dragStartPos).manhattanLength() > QApplication::startDragDistance()) {
wasDesktopMove = true;
effects->defineCursor(Qt::ClosedHandCursor);
}

@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KDE/KLocalizedString>
#include <KDE/KStandardDirs>
#include <QDebug>
#include <kglobalsettings.h>
#include <kdeclarative/kdeclarative.h>
#include <kwinglutils.h>
@ -633,7 +632,7 @@ void PresentWindowsEffect::windowInputMouseEvent(QEvent *e)
} else if (highlightCandidate && !m_motionManager.areWindowsMoving())
setHighlightedWindow(highlightCandidate);
if (e->type() == QEvent::MouseMove && m_dragWindow) {
if ((me->pos() - m_dragStart).manhattanLength() > KGlobalSettings::dndEventDelay() && !m_dragInProgress) {
if ((me->pos() - m_dragStart).manhattanLength() > QApplication::startDragDistance() && !m_dragInProgress) {
m_dragInProgress = true;
effects->defineCursor(Qt::ForbiddenCursor);
}

@ -50,7 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QVarLengthArray>
#include <QX11Info>
#include <KDE/KGlobalSettings>
#include "outline.h"
namespace KWin
@ -2761,7 +2760,7 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root)
if (!moveResizeMode) {
QPoint p(QPoint(x - padding_left, y - padding_top) - moveOffset);
if (p.manhattanLength() >= KGlobalSettings::dndEventDelay()) {
if (p.manhattanLength() >= QApplication::startDragDistance()) {
if (!startMoveResize()) {
buttonDown = false;
updateCursor();

Loading…
Cancel
Save