summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--src/client/configure.json4
-rw-r--r--src/client/qwaylandinputdevice.cpp8
-rw-r--r--src/client/qwaylandinputdevice_p.h3
-rw-r--r--src/client/qwaylandscreen.cpp2
-rw-r--r--src/client/qwaylandwindow.cpp16
-rw-r--r--src/client/qwaylandwindow_p.h1
7 files changed, 23 insertions, 13 deletions
diff --git a/.qmake.conf b/.qmake.conf
index b1c22d3b7..0dcf6d9b0 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,3 +1,3 @@
load(qt_build_config)
-MODULE_VERSION = 5.9.0
+MODULE_VERSION = 5.9.1
diff --git a/src/client/configure.json b/src/client/configure.json
index c29a8b609..d216960e1 100644
--- a/src/client/configure.json
+++ b/src/client/configure.json
@@ -92,12 +92,12 @@
},
"xcomposite-egl": {
"label": "XComposite EGL",
- "condition": "features.wayland-client && features.opengl && features.egl && libs.xcomposite",
+ "condition": "features.wayland-client && features.opengl && features.egl && features.xlib && libs.xcomposite",
"output": [ "privateFeature" ]
},
"xcomposite-glx": {
"label": "XComposite GLX",
- "condition": "features.wayland-client && features.opengl && !features.opengles2 && libs.xcomposite && libs.glx",
+ "condition": "features.wayland-client && features.opengl && !features.opengles2 && features.xlib && libs.xcomposite && libs.glx",
"output": [ "privateFeature" ]
},
"drm-egl-server": {
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index b0c6394e2..4def0de8f 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -377,7 +377,7 @@ void QWaylandInputDevice::setCursor(Qt::CursorShape newShape, QWaylandScreen *sc
void QWaylandInputDevice::setCursor(const QCursor &cursor, QWaylandScreen *screen)
{
- if (cursor.shape() != Qt::BitmapCursor && cursor.shape() == mPointer->mCursorShape)
+ if (mPointer->mCursorSerial >= mPointer->mEnterSerial && (cursor.shape() != Qt::BitmapCursor && cursor.shape() == mPointer->mCursorShape))
return;
mPointer->mCursorShape = cursor.shape();
@@ -583,8 +583,8 @@ void QWaylandInputDevice::Pointer::releaseButtons()
class WheelEvent : public QWaylandPointerEvent
{
public:
- WheelEvent(ulong t, const QPointF &l, const QPointF &g, const QPoint &pd, const QPoint &ad)
- : QWaylandPointerEvent(QWaylandPointerEvent::Wheel, t, l, g, pd, ad)
+ WheelEvent(ulong t, const QPointF &l, const QPointF &g, const QPoint &pd, const QPoint &ad, Qt::KeyboardModifiers m)
+ : QWaylandPointerEvent(QWaylandPointerEvent::Wheel, t, l, g, pd, ad, m)
{
}
};
@@ -612,7 +612,7 @@ void QWaylandInputDevice::Pointer::pointer_axis(uint32_t time, uint32_t axis, in
angleDelta.setY(valueDelta);
}
- WheelEvent e(time, mSurfacePos, mGlobalPos, pixelDelta, angleDelta);
+ WheelEvent e(time, mSurfacePos, mGlobalPos, pixelDelta, angleDelta, mParent->modifiers());
window->handleMouse(mParent, e);
}
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h
index 4d0a47597..9e3d1d1f4 100644
--- a/src/client/qwaylandinputdevice_p.h
+++ b/src/client/qwaylandinputdevice_p.h
@@ -314,11 +314,12 @@ public:
, buttons(b)
, modifiers(m)
{}
- inline QWaylandPointerEvent(Type t, ulong ts, const QPointF &l, const QPointF &g, const QPoint &pd, const QPoint &ad)
+ inline QWaylandPointerEvent(Type t, ulong ts, const QPointF &l, const QPointF &g, const QPoint &pd, const QPoint &ad, Qt::KeyboardModifiers m)
: type(t)
, timestamp(ts)
, local(l)
, global(g)
+ , modifiers(m)
, pixelDelta(pd)
, angleDelta(ad)
{}
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
index 31d21a1c3..ac5954577 100644
--- a/src/client/qwaylandscreen.cpp
+++ b/src/client/qwaylandscreen.cpp
@@ -245,7 +245,7 @@ void QWaylandScreen::output_done()
QWindowSystemInterface::handleScreenOrientationChange(screen(), m_orientation);
mTransform = -1;
}
- QWindowSystemInterface::handleScreenGeometryChange(screen(), mGeometry, mGeometry);
+ QWindowSystemInterface::handleScreenGeometryChange(screen(), geometry(), geometry());
QWindowSystemInterface::handleScreenRefreshRateChange(screen(), refreshRate());
}
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 3a216e127..5585fd52a 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -92,6 +92,7 @@ QWaylandWindow::QWaylandWindow(QWindow *window)
, mResizeDirty(false)
, mResizeAfterSwap(qEnvironmentVariableIsSet("QT_WAYLAND_RESIZE_AFTER_SWAP"))
, mSentInitialResize(false)
+ , mScale(1)
, mState(Qt::WindowNoState)
, mMask()
, mBackingStore(Q_NULLPTR)
@@ -189,9 +190,12 @@ void QWaylandWindow::initWindow()
}
}
+ mScale = screen()->scale();
+
// Enable high-dpi rendering. Scale() returns the screen scale factor and will
// typically be integer 1 (normal-dpi) or 2 (high-dpi). Call set_buffer_scale()
// to inform the compositor that high-resolution buffers will be provided.
+ //FIXME this needs to be changed when the screen changes along with a resized backing store
if (mDisplay->compositorVersion() >= 3)
set_buffer_scale(scale());
@@ -203,6 +207,10 @@ void QWaylandWindow::initWindow()
else
setGeometry_helper(window()->geometry());
setMask(window()->mask());
+ // setWindowStateInternal is a no-op if the argument is equal to mState,
+ // but since we're creating the shellsurface only now we reset mState to
+ // make sure the state gets sent out to the compositor
+ mState = Qt::WindowNoState;
setWindowStateInternal(window()->windowState());
handleContentOrientationChange(window()->contentOrientation());
mFlags = window()->flags();
@@ -728,7 +736,7 @@ void QWaylandWindow::handleMouse(QWaylandInputDevice *inputDevice, const QWaylan
QWindowSystemInterface::handleMouseEvent(window(), e.timestamp, e.local, e.global, e.buttons, e.modifiers);
break;
case QWaylandPointerEvent::Wheel:
- QWindowSystemInterface::handleWheelEvent(window(), e.timestamp, e.local, e.global, e.pixelDelta, e.angleDelta);
+ QWindowSystemInterface::handleWheelEvent(window(), e.timestamp, e.local, e.global, e.pixelDelta, e.angleDelta, e.modifiers);
break;
}
}
@@ -796,7 +804,7 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
QWindowSystemInterface::handleMouseEvent(window(), e.timestamp, localTranslated, globalTranslated, e.buttons, e.modifiers);
break;
case QWaylandPointerEvent::Wheel:
- QWindowSystemInterface::handleWheelEvent(window(), e.timestamp, localTranslated, globalTranslated, e.pixelDelta, e.angleDelta);
+ QWindowSystemInterface::handleWheelEvent(window(), e.timestamp, localTranslated, globalTranslated, e.pixelDelta, e.angleDelta, e.modifiers);
break;
}
@@ -847,12 +855,12 @@ bool QWaylandWindow::isExposed() const
int QWaylandWindow::scale() const
{
- return screen()->scale();
+ return mScale;
}
qreal QWaylandWindow::devicePixelRatio() const
{
- return screen()->devicePixelRatio();
+ return mScale;
}
bool QWaylandWindow::setMouseGrabEnabled(bool grab)
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index 8e72b1076..29eb6c596 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -235,6 +235,7 @@ protected:
bool mSentInitialResize;
QPoint mOffset;
+ int mScale;
QIcon mWindowIcon;