Commit 5fe9fd13 authored by Severin von Wnuck's avatar Severin von Wnuck Committed by Nate Graham
Browse files

Add timestamp to window decoration mouse events

Since 4881dd63 replaced the double click timer for OffscreenQuickView
with a time check, we need to make sure the timestamp from
XInput/libinput is passed on to the actual QMouseEvent.

BUG: 448477
parent e6fb6ff5
Pipeline #131314 passed with stage
in 23 minutes and 35 seconds
......@@ -951,6 +951,7 @@ bool X11Client::buttonPressEvent(xcb_window_t w, int button, int state, int x, i
} else {
QMouseEvent event(QEvent::MouseButtonPress, QPointF(x, y), QPointF(x_root, y_root),
x11ToQtMouseButton(button), x11ToQtMouseButtons(state), x11ToQtKeyboardModifiers(state));
event.setTimestamp(time);
event.setAccepted(false);
QCoreApplication::sendEvent(decoration(), &event);
if (!event.isAccepted()) {
......
......@@ -1195,6 +1195,7 @@ public:
return actionResult.second;
}
QMouseEvent e(event->type(), p, event->globalPos(), event->button(), event->buttons(), event->modifiers());
e.setTimestamp(event->timestamp());
e.setAccepted(false);
QCoreApplication::sendEvent(decoration->decoration(), &e);
if (!e.isAccepted() && event->type() == QEvent::MouseButtonPress) {
......
Supports Markdown
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