summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qguiapplication.cpp7
-rw-r--r--src/gui/kernel/qwindow.cpp18
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h5
3 files changed, 16 insertions, 14 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 72e95c996c..190d52776a 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1392,7 +1392,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
// Ignore mouse events that don't change the current state.
return;
}
- buttons = e->buttons;
+ mouse_buttons = buttons = e->buttons;
if (button & e->buttons) {
ulong doubleClickInterval = static_cast<ulong>(qApp->styleHints()->mouseDoubleClickInterval());
doubleClick = e->timestamp - mousePressTime < doubleClickInterval && button == mousePressButton;
@@ -1688,7 +1688,10 @@ void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::T
type = e->down ? QEvent::TabletPress : QEvent::TabletRelease;
tabletState = e->down;
}
+
QWindow *window = e->window.data();
+ modifier_buttons = e->modifiers;
+
bool localValid = true;
// If window is null, pick one based on the global position and make sure all
// subsequent events up to the release are delivered to that same window.
@@ -1719,7 +1722,7 @@ void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::T
QTabletEvent ev(type, local, e->global,
e->device, e->pointerType, e->pressure, e->xTilt, e->yTilt,
e->tangentialPressure, e->rotation, e->z,
- e->mods, e->uid);
+ e->modifiers, e->uid);
ev.setTimestamp(e->timestamp);
QGuiApplication::sendSpontaneousEvent(window, &ev);
#else
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index b6d592e050..22ad748fb5 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -1105,16 +1105,16 @@ void QWindow::setGeometry(const QRect &rect)
d->platformWindow->setGeometry(rect);
} else {
d->geometry = rect;
- }
- if (rect.x() != oldRect.x())
- emit xChanged(rect.x());
- if (rect.y() != oldRect.y())
- emit yChanged(rect.y());
- if (rect.width() != oldRect.width())
- emit widthChanged(rect.width());
- if (rect.height() != oldRect.height())
- emit heightChanged(rect.height());
+ if (rect.x() != oldRect.x())
+ emit xChanged(rect.x());
+ if (rect.y() != oldRect.y())
+ emit yChanged(rect.y());
+ if (rect.width() != oldRect.width())
+ emit widthChanged(rect.width());
+ if (rect.height() != oldRect.height())
+ emit heightChanged(rect.height());
+ }
}
/*!
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h
index e8d2a85dd9..dfdf7e9e93 100644
--- a/src/gui/kernel/qwindowsysteminterface_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_p.h
@@ -302,10 +302,10 @@ public:
TabletEvent(QWindow *w, ulong time, bool down, const QPointF &local, const QPointF &global,
int device, int pointerType, qreal pressure, int xTilt, int yTilt, qreal tpressure,
qreal rotation, int z, qint64 uid, Qt::KeyboardModifiers mods)
- : InputEvent(w, time, Tablet, Qt::NoModifier),
+ : InputEvent(w, time, Tablet, mods),
down(down), local(local), global(global), device(device), pointerType(pointerType),
pressure(pressure), xTilt(xTilt), yTilt(yTilt), tangentialPressure(tpressure),
- rotation(rotation), z(z), uid(uid), mods(mods) { }
+ rotation(rotation), z(z), uid(uid) { }
bool down;
QPointF local;
QPointF global;
@@ -318,7 +318,6 @@ public:
qreal rotation;
int z;
qint64 uid;
- Qt::KeyboardModifiers mods;
};
class TabletEnterProximityEvent : public InputEvent {