![]() |
Qt 6.x
The Qt SDK
|
#include <qwaylandwindow_p.h>
Public Types | |
enum | WindowType { Shm , Egl , Vulkan } |
enum | ToplevelWindowTilingState { WindowNoState = 0 , WindowTiledLeft = 1 , WindowTiledRight = 2 , WindowTiledTop = 4 , WindowTiledBottom = 8 } |
Public Slots | |
void | applyConfigure () |
Signals | |
void | wlSurfaceCreated () |
void | wlSurfaceDestroyed () |
Public Member Functions | |
QWaylandWindow (QWindow *window, QWaylandDisplay *display) | |
~QWaylandWindow () override | |
virtual WindowType | windowType () const =0 |
virtual void | ensureSize () |
WId | winId () const override |
Reimplement in subclasses to return a handle to the native window. | |
void | setVisible (bool visible) override |
Reimplemented in subclasses to show the surface if visible is true , and hide it if visible is false . | |
void | setParent (const QPlatformWindow *parent) override |
This function is called to enable native child window in QPA. | |
void | setWindowTitle (const QString &title) override |
Reimplement to set the window title to title. | |
QIcon | windowIcon () const |
void | setWindowIcon (const QIcon &icon) override |
Reimplement to set the window icon to icon. | |
void | setGeometry (const QRect &rect) override |
This function is called by Qt whenever a window is moved or resized using the QWindow API. | |
void | resizeFromApplyConfigure (const QSize &sizeWithMargins, const QPoint &offset={0, 0}) |
void | repositionFromApplyConfigure (const QPoint &position) |
void | setGeometryFromApplyConfigure (const QPoint &globalPosition, const QSize &sizeWithMargins) |
void | applyConfigureWhenPossible () |
void | attach (QWaylandBuffer *buffer, int x, int y) |
void | attachOffset (QWaylandBuffer *buffer) |
QPoint | attachOffset () const |
void | damage (const QRect &rect) |
void | safeCommit (QWaylandBuffer *buffer, const QRegion &damage) |
void | handleExpose (const QRegion ®ion) |
void | commit (QWaylandBuffer *buffer, const QRegion &damage) |
void | commit () |
bool | waitForFrameSync (int timeout) |
QMargins | frameMargins () const override |
QMargins | clientSideMargins () const |
void | setCustomMargins (const QMargins &margins) override |
QSize | surfaceSize () const |
Size, with decorations (including including eventual shadows) in wl_surface coordinates. | |
QMargins | windowContentMargins () const |
QRect | windowContentGeometry () const |
Window geometry as defined by the xdg-shell spec (in wl_surface coordinates) topLeft is where the shadow stops and the decorations border start. | |
QPointF | mapFromWlSurface (const QPointF &surfacePosition) const |
Converts from wl_surface coordinates to Qt window coordinates. | |
QWaylandSurface * | waylandSurface () const |
::wl_surface * | wlSurface () |
::wl_surface * | surface () const override |
QWaylandDisplay * | display () const |
QWaylandShellSurface * | shellSurface () const |
std::any | _surfaceRole () const override |
QWaylandSubSurface * | subSurfaceWindow () const |
QWaylandScreen * | waylandScreen () const |
void | handleContentOrientationChange (Qt::ScreenOrientation orientation) override |
Handle changes to the orientation of the platform window's contents. | |
void | setOrientationMask (Qt::ScreenOrientations mask) |
ToplevelWindowTilingStates | toplevelWindowTilingStates () const |
void | handleToplevelWindowTilingStatesChanged (ToplevelWindowTilingStates states) |
Qt::WindowStates | windowStates () const |
void | setWindowState (Qt::WindowStates states) override |
Requests setting the window state of this surface to type. | |
void | setWindowFlags (Qt::WindowFlags flags) override |
Requests setting the window flags of this surface to flags. | |
void | handleWindowStatesChanged (Qt::WindowStates states) |
void | raise () override |
Reimplement to be able to let Qt raise windows to the top of the desktop. | |
void | lower () override |
Reimplement to be able to let Qt lower windows to the bottom of the desktop. | |
void | setMask (const QRegion ®ion) override |
Reimplement to be able to let Qt set the mask of a window. | |
void | setAlertState (bool enabled) override |
Reimplement this method to set whether the window demands attention (for example, by flashing the taskbar icon) depending on enabled. | |
bool | isAlertState () const override |
Reimplement this method return whether the window is in an alert state. | |
qreal | scale () const |
qreal | devicePixelRatio () const override |
Reimplement this function in subclass to return the device pixel ratio for the window. | |
void | requestActivateWindow () override |
Reimplement to let Qt be able to request activation/focus for a window. | |
bool | isExposed () const override |
Returns if this window is exposed in the windowing system. | |
bool | isActive () const override |
Returns true if the window should appear active from a style perspective. | |
QWaylandAbstractDecoration * | decoration () const |
void | handleMouse (QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e) |
void | handleSwipeGesture (QWaylandInputDevice *inputDevice, const QWaylandPointerGestureSwipeEvent &e) |
void | handlePinchGesture (QWaylandInputDevice *inputDevice, const QWaylandPointerGesturePinchEvent &e) |
bool | touchDragDecoration (QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, QEventPoint::State state, Qt::KeyboardModifiers mods) |
bool | createDecoration () |
QWaylandWindow * | transientParent () const |
QMutex * | resizeMutex () |
void | doApplyConfigure () |
void | setCanResize (bool canResize) |
bool | setMouseGrabEnabled (bool grab) override |
void | sendProperty (const QString &name, const QVariant &value) |
void | setProperty (const QString &name, const QVariant &value) |
QVariantMap | properties () const |
QVariant | property (const QString &name) |
QVariant | property (const QString &name, const QVariant &defaultValue) |
void | setBackingStore (QWaylandShmBackingStore *backingStore) |
QWaylandShmBackingStore * | backingStore () const |
void | setShellIntegration (QWaylandShellIntegration *shellIntegration) |
QWaylandShellIntegration * | shellIntegration () const |
bool | setKeyboardGrabEnabled (bool) override |
void | propagateSizeHints () override |
Reimplement to propagate the size hints of the QWindow. | |
void | addAttachOffset (const QPoint point) |
bool | startSystemResize (Qt::Edges edges) override |
Reimplement this method to start a system resize operation if the system supports it and return true to indicate success. | |
bool | startSystemMove () override |
Reimplement this method to start a system move operation if the system supports it and return true to indicate success. | |
void | timerEvent (QTimerEvent *event) override |
void | requestUpdate () override |
Requests an QEvent::UpdateRequest event. | |
void | handleUpdate () |
void | deliverUpdateRequest () override |
Delivers an QEvent::UpdateRequest event to the window. | |
void | setXdgActivationToken (const QString &token) |
void | requestXdgActivationToken (uint serial) override |
void | beginFrame () |
void | endFrame () |
void | closeChildPopups () |
virtual void | reinit () |
void | reset () |
![]() | |
QPlatformWindow (QWindow *window) | |
Constructs a platform window with the given top level window. | |
~QPlatformWindow () override | |
Virtual destructor does not delete its top level window. | |
virtual void | initialize () |
Called as part of QWindow::create(), after constructing the window. | |
QWindow * | window () const |
Returns the window which belongs to the QPlatformWindow. | |
QPlatformWindow * | parent () const |
Returns the parent platform window (or \nullptr if orphan). | |
QPlatformScreen * | screen () const override |
Returns the platform screen handle corresponding to this platform window, or null if the window is not associated with a screen. | |
virtual QSurfaceFormat | format () const override |
Returns the actual surface format of the window. | |
virtual void | setGeometry (const QRect &rect) |
This function is called by Qt whenever a window is moved or resized using the QWindow API. | |
virtual QRect | geometry () const |
Returns the current geometry of a window. | |
virtual QRect | normalGeometry () const |
Returns the geometry of a window in 'normal' state (neither maximized, fullscreen nor minimized) for saving geometries to application settings. | |
virtual QMargins | frameMargins () const |
virtual QMargins | safeAreaMargins () const |
The safe area margins of a window represent the area that is safe to place content within, without intersecting areas of the screen where system UI is placed, or where a screen bezel may cover the content. | |
virtual void | setVisible (bool visible) |
Reimplemented in subclasses to show the surface if visible is true , and hide it if visible is false . | |
virtual void | setWindowFlags (Qt::WindowFlags flags) |
Requests setting the window flags of this surface to flags. | |
virtual void | setWindowState (Qt::WindowStates state) |
Requests setting the window state of this surface to type. | |
virtual WId | winId () const |
Reimplement in subclasses to return a handle to the native window. | |
virtual void | setParent (const QPlatformWindow *window) |
This function is called to enable native child window in QPA. | |
virtual void | setWindowTitle (const QString &title) |
Reimplement to set the window title to title. | |
virtual void | setWindowFilePath (const QString &title) |
Reimplement to set the window file path to filePath. | |
virtual void | setWindowIcon (const QIcon &icon) |
Reimplement to set the window icon to icon. | |
virtual bool | close () |
Reimplement to let the platform handle non-spontaneous window close. | |
virtual void | raise () |
Reimplement to be able to let Qt raise windows to the top of the desktop. | |
virtual void | lower () |
Reimplement to be able to let Qt lower windows to the bottom of the desktop. | |
virtual bool | isExposed () const |
Returns if this window is exposed in the windowing system. | |
virtual bool | isActive () const |
Returns true if the window should appear active from a style perspective. | |
virtual bool | isAncestorOf (const QPlatformWindow *child) const |
Returns true if the window is an ancestor of the given child. | |
virtual bool | isEmbedded () const |
Returns true if the window is a child of a non-Qt window. | |
virtual bool | isForeignWindow () const |
virtual QPoint | mapToGlobal (const QPoint &pos) const |
Translates the window coordinate pos to global screen coordinates using native methods. | |
QPointF | mapToGlobalF (const QPointF &pos) const |
virtual QPoint | mapFromGlobal (const QPoint &pos) const |
Translates the global screen coordinate pos to window coordinates using native methods. | |
QPointF | mapFromGlobalF (const QPointF &pos) const |
virtual void | propagateSizeHints () |
Reimplement to propagate the size hints of the QWindow. | |
virtual void | setOpacity (qreal level) |
Reimplement to be able to let Qt set the opacity level of a window. | |
virtual void | setMask (const QRegion ®ion) |
Reimplement to be able to let Qt set the mask of a window. | |
virtual void | requestActivateWindow () |
Reimplement to let Qt be able to request activation/focus for a window. | |
virtual void | handleContentOrientationChange (Qt::ScreenOrientation orientation) |
Handle changes to the orientation of the platform window's contents. | |
virtual qreal | devicePixelRatio () const |
Reimplement this function in subclass to return the device pixel ratio for the window. | |
virtual bool | setKeyboardGrabEnabled (bool grab) |
virtual bool | setMouseGrabEnabled (bool grab) |
virtual bool | setWindowModified (bool modified) |
Reimplement to be able to let Qt indicate that the window has been modified. | |
virtual bool | windowEvent (QEvent *event) |
Reimplement this method to be able to do any platform specific event handling. | |
virtual bool | startSystemResize (Qt::Edges edges) |
Reimplement this method to start a system resize operation if the system supports it and return true to indicate success. | |
virtual bool | startSystemMove () |
Reimplement this method to start a system move operation if the system supports it and return true to indicate success. | |
virtual void | setFrameStrutEventsEnabled (bool enabled) |
Reimplement this method to set whether frame strut events should be sent to enabled. | |
virtual bool | frameStrutEventsEnabled () const |
Reimplement this method to return whether frame strut events are enabled. | |
virtual void | setAlertState (bool enabled) |
Reimplement this method to set whether the window demands attention (for example, by flashing the taskbar icon) depending on enabled. | |
virtual bool | isAlertState () const |
Reimplement this method return whether the window is in an alert state. | |
virtual void | invalidateSurface () |
Invalidates the window's surface by releasing its surface buffers. | |
virtual void | requestUpdate () |
Requests an QEvent::UpdateRequest event. | |
bool | hasPendingUpdateRequest () const |
Returns true if the window has a pending update request. | |
virtual void | deliverUpdateRequest () |
Delivers an QEvent::UpdateRequest event to the window. | |
QSize | windowMinimumSize () const |
Returns the QWindow minimum size. | |
QSize | windowMaximumSize () const |
Returns the QWindow maximum size. | |
QSize | windowBaseSize () const |
Returns the QWindow base size. | |
QSize | windowSizeIncrement () const |
Returns the QWindow size increment. | |
QRect | windowGeometry () const |
Returns the QWindow geometry. | |
QRect | windowFrameGeometry () const |
Returns the QWindow frame geometry. | |
QRectF | windowClosestAcceptableGeometry (const QRectF &nativeRect) const |
![]() | |
virtual | ~QPlatformSurface () |
virtual QSurfaceFormat | format () const =0 |
QSurface * | surface () const |
virtual QPlatformScreen * | screen () const =0 |
Static Public Member Functions | |
static QWaylandWindow * | fromWlSurface (::wl_surface *surface) |
static QWaylandWindow * | mouseGrab () |
![]() | |
static QRect | initialGeometry (const QWindow *w, const QRect &initialGeometry, int defaultWidth, int defaultHeight, const QScreen **resultingScreenReturn=nullptr) |
Helper function to get initial geometry on windowing systems which do not do smart positioning and also do not provide a means of centering a transient window w.r.t. | |
static QRectF | closestAcceptableGeometry (const QWindow *w, const QRectF &nativeRect) |
Returns the closest acceptable geometry for a given geometry before a resize/move event for platforms that support it, for example to implement heightForWidth(). | |
![]() | |
static bool | isRasterSurface (QSurface *surface) |
Static Public Attributes | |
static bool | fixedToplevelPositions = true |
Protected Types | |
enum | GestureState { GestureNotActive , GestureActiveInContentArea , GestureActiveInDecoration } |
Protected Member Functions | |
virtual void | doHandleFrameCallback () |
virtual QRect | defaultGeometry () const |
void | sendExposeEvent (const QRect &rect) |
![]() | |
QPlatformScreen * | screenForGeometry (const QRect &newGeometry) const |
Helper function for finding the new screen for newGeometry in response to a geometry changed event. | |
Friends | |
class | QWaylandSubSurface |
Additional Inherited Members | |
![]() | |
static QString | formatWindowTitle (const QString &title, const QString &separator) |
Call this method to put together a window title composed of title separator the application display name. | |
static QSize | constrainWindowSize (const QSize &size) |
Returns a size with both dimensions bounded to [0, QWINDOWSIZE_MAX]. | |
Definition at line 62 of file qwaylandwindow_p.h.
|
protected |
Enumerator | |
---|---|
GestureNotActive | |
GestureActiveInContentArea | |
GestureActiveInDecoration |
Definition at line 264 of file qwaylandwindow_p.h.
Enumerator | |
---|---|
WindowNoState | |
WindowTiledLeft | |
WindowTiledRight | |
WindowTiledTop | |
WindowTiledBottom |
Definition at line 73 of file qwaylandwindow_p.h.
Enumerator | |
---|---|
Shm | |
Egl | |
Vulkan |
Definition at line 67 of file qwaylandwindow_p.h.
QtWaylandClient::QWaylandWindow::QWaylandWindow | ( | QWindow * | window, |
QWaylandDisplay * | display | ||
) |
Definition at line 45 of file qwaylandwindow.cpp.
References connect(), ok, qEnvironmentVariableIntValue(), wlSurfaceCreated(), and wlSurfaceDestroyed().
|
override |
Definition at line 71 of file qwaylandwindow.cpp.
References QWindowSystemInterface::handleCloseEvent(), mSurface, mWindowDecoration, QPlatformWindow::parent(), reset(), QGuiApplication::topLevelWindows(), and QPlatformWindow::window().
|
override |
Definition at line 901 of file qwaylandwindow.cpp.
References QtWaylandClient::QWaylandShellSurface::surfaceRole().
Definition at line 1606 of file qwaylandwindow.cpp.
|
slot |
Definition at line 651 of file qwaylandwindow.cpp.
References QWindowSystemInterface::flushWindowSystemEvents(), and lock.
void QtWaylandClient::QWaylandWindow::applyConfigureWhenPossible | ( | ) |
Definition at line 595 of file qwaylandwindow.cpp.
References QMetaObject::invokeMethod(), and Qt::QueuedConnection.
Referenced by QtWaylandClient::QWaylandShellSurface::applyConfigureWhenPossible(), QtWaylandClient::QWaylandIviSurface::ivi_surface_configure(), QtWaylandClient::QWaylandWlShellSurface::requestWindowStates(), QtWaylandClient::QWaylandWlShellSurface::shell_surface_configure(), and QtWaylandClient::QWaylandXdgSurface::xdg_surface_configure().
void QtWaylandClient::QWaylandWindow::attach | ( | QWaylandBuffer * | buffer, |
int | x, | ||
int | y | ||
) |
Definition at line 675 of file qwaylandwindow.cpp.
References Q_ASSERT.
|
inline |
Definition at line 365 of file qwaylandwindow_p.h.
References mOffset.
void QtWaylandClient::QWaylandWindow::attachOffset | ( | QWaylandBuffer * | buffer | ) |
Definition at line 692 of file qwaylandwindow.cpp.
|
inline |
Definition at line 205 of file qwaylandwindow_p.h.
void QtWaylandClient::QWaylandWindow::beginFrame | ( | ) |
Definition at line 264 of file qwaylandwindow.cpp.
Referenced by QtWaylandClient::QWaylandGLContext::beginFrame().
QMargins QtWaylandClient::QWaylandWindow::clientSideMargins | ( | ) | const |
Definition at line 835 of file qwaylandwindow.cpp.
void QtWaylandClient::QWaylandWindow::closeChildPopups | ( | ) |
Definition at line 1674 of file qwaylandwindow.cpp.
References mChildPopups.
void QtWaylandClient::QWaylandWindow::commit | ( | ) |
Definition at line 757 of file qwaylandwindow.cpp.
Referenced by QtWaylandClient::QWaylandBrcmEglWindow::swapBuffers().
void QtWaylandClient::QWaylandWindow::commit | ( | QWaylandBuffer * | buffer, |
const QRegion & | damage | ||
) |
Definition at line 731 of file qwaylandwindow.cpp.
References Q_ASSERT, qCDebug, qCeil(), qFloor(), and rect.
Referenced by QtWaylandClient::QWaylandXdgSurface::propagateSizeHints().
bool QtWaylandClient::QWaylandWindow::createDecoration | ( | ) |
Definition at line 977 of file qwaylandwindow.cpp.
References Qt::BypassWindowManagerHint, decoration, Qt::Dialog, Qt::Drawer, Qt::FramelessWindowHint, QString::fromLocal8Bit(), QMetaObject::invokeMethod(), QString::isEmpty(), QByteArray::isEmpty(), pos, qgetenv(), qWarning, Qt::Tool, Qt::Widget, Qt::Window, and window().
Referenced by QtWaylandClient::QWaylandShmBackingStore::ensureSize(), and QtWaylandClient::QWaylandGLContext::makeCurrent().
Definition at line 698 of file qwaylandwindow.cpp.
References qCeil(), qFloor(), and rect.
Referenced by QtWaylandClient::QWaylandAbstractDecoration::contentImage().
QWaylandAbstractDecoration * QtWaylandClient::QWaylandWindow::decoration | ( | ) | const |
Definition at line 1069 of file qwaylandwindow.cpp.
Referenced by QtWaylandClient::QWaylandEglWindow::bindContentFBO(), QtWaylandClient::QWaylandEglWindow::contentFBO(), QtWaylandClient::QWaylandGLContext::makeCurrent(), and QtWaylandClient::QWaylandShmBackingStore::windowDecoration().
|
protectedvirtual |
Definition at line 386 of file qwaylandwindow.cpp.
|
overridevirtual |
Delivers an QEvent::UpdateRequest event to the window.
QPlatformWindow subclasses can re-implement this function to provide e.g. logging or tracing of the delivery, but should always call the base class function.
Reimplemented from QPlatformWindow.
Definition at line 1599 of file qwaylandwindow.cpp.
References QPlatformWindow::deliverUpdateRequest(), and qCDebug.
Referenced by reinit().
|
overridevirtual |
Reimplement this function in subclass to return the device pixel ratio for the window.
This is the ratio between physical pixels and device-independent pixels.
Reimplemented from QPlatformWindow.
Definition at line 1429 of file qwaylandwindow.cpp.
|
inline |
Definition at line 136 of file qwaylandwindow_p.h.
Referenced by QtWaylandClient::QWaylandWlShellSurface::QWaylandWlShellSurface(), QtWaylandClient::QWaylandXdgSurface::QWaylandXdgSurface(), QtWaylandClient::QWaylandShellSurface::handleActivationChanged(), and startSystemMove().
void QtWaylandClient::QWaylandWindow::doApplyConfigure | ( | ) |
Definition at line 604 of file qwaylandwindow.cpp.
References QThread::currentThreadId(), QThreadData::get2(), and Q_ASSERT_X.
|
protectedvirtual |
Definition at line 796 of file qwaylandwindow.cpp.
void QtWaylandClient::QWaylandWindow::endFrame | ( | ) |
Definition at line 269 of file qwaylandwindow.cpp.
Referenced by QtWaylandClient::QWaylandGLContext::endFrame().
|
virtual |
Reimplemented in QtWaylandClient::QWaylandEglWindow.
Definition at line 90 of file qwaylandwindow.cpp.
References QtWaylandClient::QWaylandShmBackingStore::ensureSize(), and mBackingStore.
|
overridevirtual |
Reimplemented from QPlatformWindow.
Definition at line 825 of file qwaylandwindow.cpp.
References QPlatformWindow::frameMargins().
Referenced by QtWaylandClient::QWaylandEglWindow::contentsRect(), and QtWaylandClient::QWaylandEglWindow::updateSurface().
|
static |
Definition at line 323 of file qwaylandwindow.cpp.
Referenced by QtWaylandClient::QWaylandQtKeyExtension::zqt_key_v1_key(), QtWaylandClient::QWaylandPointerGesturePinch::zwp_pointer_gesture_pinch_v1_begin(), QtWaylandClient::QWaylandPointerGestureSwipe::zwp_pointer_gesture_swipe_v1_begin(), and QtWaylandClient::QWaylandTabletToolV2::zwp_tablet_tool_v2_frame().
|
overridevirtual |
Handle changes to the orientation of the platform window's contents.
This is a hint to the window manager in case it needs to display additional content like popups, dialogs, status bars, or similar in relation to the window.
Reimplemented from QPlatformWindow.
Definition at line 924 of file qwaylandwindow.cpp.
References Qt::InvertedLandscapeOrientation, Qt::InvertedPortraitOrientation, Qt::LandscapeOrientation, Qt::PortraitOrientation, Qt::PrimaryOrientation, and window().
Definition at line 721 of file qwaylandwindow.cpp.
References QWindowSystemInterface::handleExposeEvent(), and window().
Referenced by QtWaylandClient::QWaylandXdgSurface::xdg_surface_configure().
void QtWaylandClient::QWaylandWindow::handleMouse | ( | QWaylandInputDevice * | inputDevice, |
const QWaylandPointerEvent & | e | ||
) |
Definition at line 1104 of file qwaylandwindow.cpp.
References QRect::contains(), e, QEvent::Enter, QWindowSystemInterface::handleEnterEvent(), QWindowSystemInterface::handleLeaveEvent(), QWindowSystemInterface::handleMouseEvent(), QWindowSystemInterface::handleWheelEvent(), QEvent::Leave, QRect::marginsRemoved(), QEvent::MouseButtonPress, QEvent::MouseButtonRelease, QEvent::MouseMove, QEvent::Wheel, and window().
void QtWaylandClient::QWaylandWindow::handlePinchGesture | ( | QWaylandInputDevice * | inputDevice, |
const QWaylandPointerGesturePinchEvent & | e | ||
) |
Definition at line 1206 of file qwaylandwindow.cpp.
References Qt::BeginNativeGesture, e, Qt::EndNativeGesture, Qt::GestureCanceled, Qt::GestureFinished, Qt::GestureStarted, Qt::GestureUpdated, QWindowSystemInterface::handleGestureEvent(), QWindowSystemInterface::handleGestureEventWithRealValue(), QWindowSystemInterface::handleGestureEventWithValueAndDelta(), QtWaylandClient::QWaylandInputDevice::mTouchPadDevice, Qt::PanNativeGesture, qCWarning, Qt::RotateNativeGesture, window(), and Qt::ZoomNativeGesture.
void QtWaylandClient::QWaylandWindow::handleSwipeGesture | ( | QWaylandInputDevice * | inputDevice, |
const QWaylandPointerGestureSwipeEvent & | e | ||
) |
Definition at line 1151 of file qwaylandwindow.cpp.
References Qt::BeginNativeGesture, e, Qt::EndNativeGesture, Qt::GestureCanceled, Qt::GestureFinished, Qt::GestureStarted, Qt::GestureUpdated, QWindowSystemInterface::handleGestureEvent(), QWindowSystemInterface::handleGestureEventWithValueAndDelta(), QtWaylandClient::QWaylandInputDevice::mTouchPadDevice, Qt::PanNativeGesture, qCWarning, and window().
void QtWaylandClient::QWaylandWindow::handleToplevelWindowTilingStatesChanged | ( | ToplevelWindowTilingStates | states | ) |
Definition at line 1450 of file qwaylandwindow.cpp.
void QtWaylandClient::QWaylandWindow::handleUpdate | ( | ) |
Definition at line 1564 of file qwaylandwindow.cpp.
References QThread::currentThread(), QMetaObject::invokeMethod(), lock, qCDebug, and Qt::QueuedConnection.
void QtWaylandClient::QWaylandWindow::handleWindowStatesChanged | ( | Qt::WindowStates | states | ) |
Definition at line 1460 of file qwaylandwindow.cpp.
References QWindowSystemInterface::handleWindowStateChanged(), and window().
Referenced by QtWaylandClient::QWaylandWlShellSurface::applyConfigure().
|
overridevirtual |
Returns true
if the window should appear active from a style perspective.
This function can make platform-specific isActive checks, such as checking if the QWindow is embedded in an active native window.
Reimplemented from QPlatformWindow.
Definition at line 1419 of file qwaylandwindow.cpp.
|
overridevirtual |
Reimplement this method return whether the window is in an alert state.
Reimplemented from QPlatformWindow.
Definition at line 587 of file qwaylandwindow.cpp.
|
overridevirtual |
Returns if this window is exposed in the windowing system.
An exposeEvent() is sent every time this value changes.
Reimplemented from QPlatformWindow.
Definition at line 1402 of file qwaylandwindow.cpp.
References isVisible(), and window().
Referenced by QtWaylandClient::QWaylandGLContext::makeCurrent().
|
overridevirtual |
Reimplement to be able to let Qt lower windows to the bottom of the desktop.
Reimplemented from QPlatformWindow.
Definition at line 547 of file qwaylandwindow.cpp.
Converts from wl_surface coordinates to Qt window coordinates.
Qt window coordinates start inside (not including) the window decorations, while wl_surface coordinates start at the first pixel of the buffer. Potentially, this should be in the window shadow, although we don't have those. So for now, it's the first pixel of the decorations.
Definition at line 884 of file qwaylandwindow.cpp.
References QMargins::left(), QMargins::top(), QPointF::x(), and QPointF::y().
Referenced by QtWaylandClient::QWaylandTabletToolV2::zwp_tablet_tool_v2_frame().
|
inlinestatic |
Definition at line 195 of file qwaylandwindow_p.h.
|
overridevirtual |
Reimplement to propagate the size hints of the QWindow.
The size hints include QWindow::minimumSize(), QWindow::maximumSize(), QWindow::sizeIncrement(), and QWindow::baseSize().
Reimplemented from QPlatformWindow.
Definition at line 1611 of file qwaylandwindow.cpp.
QVariantMap QtWaylandClient::QWaylandWindow::properties | ( | ) | const |
Definition at line 1488 of file qwaylandwindow.cpp.
Referenced by QtWaylandClient::QWaylandNativeInterface::windowProperties().
Definition at line 1493 of file qwaylandwindow.cpp.
References QVariant::value().
Referenced by QtWaylandClient::QWaylandNativeInterface::windowProperty(), and QtWaylandClient::QWaylandNativeInterface::windowProperty().
QVariant QtWaylandClient::QWaylandWindow::property | ( | const QString & | name, |
const QVariant & | defaultValue | ||
) |
Definition at line 1498 of file qwaylandwindow.cpp.
References QVariant::value().
|
overridevirtual |
Reimplement to be able to let Qt raise windows to the top of the desktop.
Reimplemented from QPlatformWindow.
Definition at line 540 of file qwaylandwindow.cpp.
|
virtual |
Definition at line 1681 of file qwaylandwindow.cpp.
References deliverUpdateRequest(), QPlatformWindow::hasPendingUpdateRequest(), isVisible(), and QPlatformWindow::window().
Definition at line 475 of file qwaylandwindow.cpp.
References QMargins::left(), and QMargins::top().
Referenced by QtWaylandClient::QWaylandShellSurface::repositionFromApplyConfigure().
|
overridevirtual |
Reimplement to let Qt be able to request activation/focus for a window.
Some window systems will probably not have callbacks for this functionality, and then calling QWindowSystemInterface::handleWindowActivated(QWindow *w) would be sufficient.
If the window system has some event handling/callbacks then call QWindowSystemInterface::handleWindowActivated(QWindow *w) when the window system gives the notification.
Default implementation calls QWindowSystem::handleWindowActivated(QWindow *w)
Reimplemented from QPlatformWindow.
Definition at line 1396 of file qwaylandwindow.cpp.
|
overridevirtual |
Requests an QEvent::UpdateRequest event.
The event will be delivered to the QWindow.
QPlatformWindow subclasses can re-implement this function to provide display refresh synchronized updates. The event should be delivered using QPlatformWindow::deliverUpdateRequest() to not get out of sync with the internal state of QWindow.
The default implementation posts an UpdateRequest event to the window after an interval that is at most 5 ms. If the window's associated screen reports a \l{QPlatformScreen::refreshRate()}{refresh rate} higher than 60 Hz, the interval is scaled down to a valid smaller than 5. The additional time is there to give the event loop a bit of idle time to gather system events.
Reimplemented from QPlatformWindow.
Definition at line 1528 of file qwaylandwindow.cpp.
References QMetaObject::invokeMethod(), Q_ASSERT, qCDebug, and Qt::QueuedConnection.
Definition at line 1650 of file qwaylandwindow.cpp.
References mShellSurface, and QtWaylandClient::QWaylandShellSurface::requestXdgActivationToken().
Referenced by QtWaylandClient::QWaylandXdgSurface::requestActivate().
void QtWaylandClient::QWaylandWindow::reset | ( | ) |
Definition at line 274 of file qwaylandwindow.cpp.
Referenced by ~QWaylandWindow().
void QtWaylandClient::QWaylandWindow::resizeFromApplyConfigure | ( | const QSize & | sizeWithMargins, |
const QPoint & | offset = {0, 0} |
||
) |
Definition at line 486 of file qwaylandwindow.cpp.
References QMargins::bottom(), QSize::height(), QMargins::left(), qMax(), QMargins::right(), QMargins::top(), and QSize::width().
Referenced by QtWaylandClient::QWaylandIviSurface::applyConfigure(), QtWaylandClient::QWaylandWlShellSurface::applyConfigure(), and QtWaylandClient::QWaylandShellSurface::resizeFromApplyConfigure().
|
inline |
Definition at line 190 of file qwaylandwindow_p.h.
void QtWaylandClient::QWaylandWindow::safeCommit | ( | QWaylandBuffer * | buffer, |
const QRegion & | damage | ||
) |
Definition at line 711 of file qwaylandwindow.cpp.
Referenced by QtWaylandClient::QWaylandShmBackingStore::flush().
qreal QtWaylandClient::QWaylandWindow::scale | ( | ) | const |
Definition at line 1424 of file qwaylandwindow.cpp.
Referenced by QtWaylandClient::QWaylandEglWindow::contentFBO(), QtWaylandClient::QWaylandAbstractDecoration::contentImage(), QtWaylandClient::QWaylandShmBackingStore::resize(), and QtWaylandClient::QWaylandEglWindow::updateSurface().
Definition at line 499 of file qwaylandwindow.cpp.
References QWindowSystemInterface::handleExposeEvent(), qCDebug, rect, and window().
Definition at line 1470 of file qwaylandwindow.cpp.
References QtWaylandClient::QWaylandNativeInterface::emitWindowPropertyChanged(), and QGuiApplication::platformNativeInterface().
Referenced by QtWaylandClient::QWaylandNativeInterface::setWindowProperty().
|
overridevirtual |
Reimplement this method to set whether the window demands attention (for example, by flashing the taskbar icon) depending on enabled.
Reimplemented from QPlatformWindow.
Definition at line 581 of file qwaylandwindow.cpp.
|
inline |
Definition at line 204 of file qwaylandwindow_p.h.
Referenced by QtWaylandClient::QWaylandShmBackingStore::ensureSize().
void QtWaylandClient::QWaylandWindow::setCanResize | ( | bool | canResize | ) |
Definition at line 627 of file qwaylandwindow.cpp.
References QThread::currentThreadId(), QThreadData::get2(), QWindowSystemInterface::handleGeometryChange(), QMetaObject::invokeMethod(), QBasicAtomicPointer< X >::loadRelaxed(), lock, Qt::QueuedConnection, QThreadData::threadId, and window().
Referenced by QtWaylandClient::QWaylandShmBackingStore::beginPaint(), QtWaylandClient::QWaylandShmBackingStore::endPaint(), and QtWaylandClient::QWaylandGLContext::makeCurrent().
Definition at line 840 of file qwaylandwindow.cpp.
This function is called by Qt whenever a window is moved or resized using the QWindow API.
Unless you also override QPlatformWindow::geometry(), you need to call the baseclass implementation of this function in any override of QPlatformWindow::setGeometry(), as QWindow::geometry() is expected to report back the set geometry until a confirmation (or rejection) of the new geometry comes back from the window manager and is reported via QWindowSystemInterface::handleGeometryChange().
Window move/resizes can also be triggered spontaneously by the window manager, or as a response to an earlier requested move/resize via the Qt APIs. There is no need to call this function from the window manager callback, instead call QWindowSystemInterface::handleGeometryChange().
The position(x, y) part of the rect might be inclusive or exclusive of the window frame as returned by frameMargins(). You can detect this in the plugin by checking qt_window_private(window())->positionPolicy.
Reimplemented from QPlatformWindow.
Definition at line 419 of file qwaylandwindow.cpp.
References QWindowSystemInterface::handleGeometryChange(), isVisible(), lock, QPlatformWindow::parent(), Qt::Popup, qt_window_private(), rect, screen, Qt::ToolTip, and window().
Referenced by QtWaylandClient::QWaylandBrcmEglWindow::setGeometry(), and QtWaylandClient::QWaylandEglWindow::setGeometry().
void QtWaylandClient::QWaylandWindow::setGeometryFromApplyConfigure | ( | const QPoint & | globalPosition, |
const QSize & | sizeWithMargins | ||
) |
Definition at line 460 of file qwaylandwindow.cpp.
References QMargins::bottom(), QSize::height(), QMargins::left(), qMax(), QMargins::right(), QMargins::top(), and QSize::width().
Referenced by QtWaylandClient::QWaylandShellSurface::setGeometryFromApplyConfigure().
|
inlineoverridevirtual |
Reimplemented from QPlatformWindow.
Definition at line 210 of file qwaylandwindow_p.h.
Reimplement to be able to let Qt set the mask of a window.
Reimplemented from QPlatformWindow.
Definition at line 553 of file qwaylandwindow.cpp.
|
overridevirtual |
Reimplemented from QPlatformWindow.
Definition at line 1434 of file qwaylandwindow.cpp.
References Qt::Popup, qWarning, this, and window().
void QtWaylandClient::QWaylandWindow::setOrientationMask | ( | Qt::ScreenOrientations | mask | ) |
Definition at line 956 of file qwaylandwindow.cpp.
|
overridevirtual |
This function is called to enable native child window in QPA.
It is common not to support this feature in Window systems, but can be faked. When this function is called all geometry of this platform window will be relative to the parent.
Reimplemented from QPlatformWindow.
Definition at line 335 of file qwaylandwindow.cpp.
References isVisible(), parent, QPlatformWindow::parent(), and window().
Definition at line 1480 of file qwaylandwindow.cpp.
References QtWaylandClient::QWaylandNativeInterface::emitWindowPropertyChanged(), and QGuiApplication::platformNativeInterface().
Referenced by QtWaylandClient::QWaylandExtendedSurface::extended_surface_set_generic_property().
void QtWaylandClient::QWaylandWindow::setShellIntegration | ( | QWaylandShellIntegration * | shellIntegration | ) |
Definition at line 232 of file qwaylandwindow.cpp.
|
overridevirtual |
Reimplemented in subclasses to show the surface if visible is true
, and hide it if visible is false
.
The default implementation sends a synchronous expose event.
Reimplemented from QPlatformWindow.
Definition at line 519 of file qwaylandwindow.cpp.
|
overridevirtual |
Requests setting the window flags of this surface to flags.
Reimplemented from QPlatformWindow.
Definition at line 968 of file qwaylandwindow.cpp.
Reimplement to set the window icon to icon.
Reimplemented from QPlatformWindow.
Definition at line 378 of file qwaylandwindow.cpp.
References icon, isVisible(), and window().
|
overridevirtual |
Requests setting the window state of this surface to type.
Qt::WindowActive can be ignored.
Reimplemented from QPlatformWindow.
Definition at line 962 of file qwaylandwindow.cpp.
Reimplement to set the window title to title.
The implementation might want to append the application display name to the window title, like Windows and Linux do.
Reimplemented from QPlatformWindow.
Definition at line 354 of file qwaylandwindow.cpp.
References QString::fromUtf8(), isVisible(), QString::left(), qCWarning, QString::size(), title, and window().
Definition at line 1655 of file qwaylandwindow.cpp.
References mShellSurface, QtWaylandClient::QWaylandShellSurface::setXdgActivationToken(), and token.
|
inline |
Definition at line 208 of file qwaylandwindow_p.h.
Referenced by QtWaylandClient::QWaylandNativeInterface::nativeResourceForWindow().
QWaylandShellSurface * QtWaylandClient::QWaylandWindow::shellSurface | ( | ) | const |
Definition at line 896 of file qwaylandwindow.cpp.
|
overridevirtual |
Reimplement this method to start a system move operation if the system supports it and return true to indicate success.
The default implementation is empty and does nothing.
Reimplemented from QPlatformWindow.
Definition at line 1624 of file qwaylandwindow.cpp.
References display(), QtWaylandClient::QWaylandShellSurface::move(), and mShellSurface.
|
overridevirtual |
Reimplement this method to start a system resize operation if the system supports it and return true to indicate success.
The default implementation is empty and does nothing with edges.
Reimplemented from QPlatformWindow.
Definition at line 1617 of file qwaylandwindow.cpp.
QWaylandSubSurface * QtWaylandClient::QWaylandWindow::subSurfaceWindow | ( | ) | const |
Definition at line 910 of file qwaylandwindow.cpp.
|
inlineoverride |
Definition at line 130 of file qwaylandwindow_p.h.
QSize QtWaylandClient::QWaylandWindow::surfaceSize | ( | ) | const |
Size, with decorations (including including eventual shadows) in wl_surface coordinates.
Definition at line 849 of file qwaylandwindow.cpp.
References QRect::marginsAdded(), and QRect::size().
Referenced by QtWaylandClient::QWaylandAbstractDecoration::contentImage().
|
override |
Definition at line 1503 of file qwaylandwindow.cpp.
QWaylandWindow::ToplevelWindowTilingStates QtWaylandClient::QWaylandWindow::toplevelWindowTilingStates | ( | ) | const |
Definition at line 1445 of file qwaylandwindow.cpp.
bool QtWaylandClient::QWaylandWindow::touchDragDecoration | ( | QWaylandInputDevice * | inputDevice, |
const QPointF & | local, | ||
const QPointF & | global, | ||
QEventPoint::State | state, | ||
Qt::KeyboardModifiers | mods | ||
) |
Definition at line 1277 of file qwaylandwindow.cpp.
QWaylandWindow * QtWaylandClient::QWaylandWindow::transientParent | ( | ) | const |
Definition at line 1085 of file qwaylandwindow.cpp.
Referenced by QtWaylandClient::QWaylandWlShellSurface::QWaylandWlShellSurface(), and QtWaylandClient::QWaylandXdgSurface::QWaylandXdgSurface().
bool QtWaylandClient::QWaylandWindow::waitForFrameSync | ( | int | timeout | ) |
Definition at line 808 of file qwaylandwindow.cpp.
QWaylandScreen * QtWaylandClient::QWaylandWindow::waylandScreen | ( | ) | const |
Definition at line 915 of file qwaylandwindow.cpp.
References Q_ASSERT, and QPlatformWindow::screen().
Referenced by QtWaylandClient::QWaylandFullScreenShellV1Surface::QWaylandFullScreenShellV1Surface().
|
inline |
Definition at line 128 of file qwaylandwindow_p.h.
QRect QtWaylandClient::QWaylandWindow::windowContentGeometry | ( | ) | const |
Window geometry as defined by the xdg-shell spec (in wl_surface coordinates) topLeft is where the shadow stops and the decorations border start.
Definition at line 871 of file qwaylandwindow.cpp.
References QMargins::left(), and QMargins::top().
Referenced by QtWaylandClient::QWaylandBradientDecoration::handleMouse(), QtWaylandClient::QWaylandBradientDecoration::handleTouch(), and QtWaylandClient::QWaylandBradientDecoration::paint().
QMargins QtWaylandClient::QWaylandWindow::windowContentMargins | ( | ) | const |
Definition at line 854 of file qwaylandwindow.cpp.
|
inline |
Definition at line 360 of file qwaylandwindow_p.h.
Referenced by QtWaylandClient::QWaylandBradientDecoration::paint().
Qt::WindowStates QtWaylandClient::QWaylandWindow::windowStates | ( | ) | const |
Definition at line 1455 of file qwaylandwindow.cpp.
|
pure virtual |
|
overridevirtual |
Reimplement in subclasses to return a handle to the native window.
Reimplemented from QPlatformWindow.
Definition at line 330 of file qwaylandwindow.cpp.
wl_surface * QtWaylandClient::QWaylandWindow::wlSurface | ( | ) |
Definition at line 890 of file qwaylandwindow.cpp.
Referenced by QtWaylandClient::QWaylandFullScreenShellV1Surface::QWaylandFullScreenShellV1Surface(), QtWaylandClient::QWaylandXdgSurface::externWindowHandle(), QtWaylandClient::QWaylandNativeInterface::nativeResourceForWindow(), QtWaylandClient::QWaylandXdgSurface::requestXdgActivationToken(), QtWaylandClient::QWaylandXdgSurface::setAlertState(), QtWaylandClient::surfaceForWindow(), and QtWaylandClient::QWaylandShellSurface::wlSurface().
|
signal |
|
signal |
|
friend |
Definition at line 355 of file qwaylandwindow_p.h.
|
inlinestatic |
Definition at line 86 of file qwaylandwindow_p.h.
Referenced by QtWaylandClient::QWaylandIntegration::QWaylandIntegration(), and QtWaylandClient::QWaylandQtShellIntegration::QWaylandQtShellIntegration().
|
protected |
Definition at line 300 of file qwaylandwindow_p.h.
|
protected |
Definition at line 315 of file qwaylandwindow_p.h.
Referenced by ensureSize().
|
protected |
Definition at line 296 of file qwaylandwindow_p.h.
|
protected |
Definition at line 322 of file qwaylandwindow_p.h.
Referenced by closeChildPopups().
|
protected |
Definition at line 256 of file qwaylandwindow_p.h.
Referenced by QtWaylandClient::QWaylandSubSurface::QWaylandSubSurface(), and QtWaylandClient::QWaylandSubSurface::~QWaylandSubSurface().
|
protected |
Definition at line 319 of file qwaylandwindow_p.h.
|
protected |
Definition at line 245 of file qwaylandwindow_p.h.
Referenced by QtWaylandClient::QWaylandEglWindow::QWaylandEglWindow(), and QtWaylandClient::QWaylandEglWindow::updateSurface().
|
protected |
Definition at line 309 of file qwaylandwindow_p.h.
|
protected |
Definition at line 250 of file qwaylandwindow_p.h.
|
protected |
Definition at line 287 of file qwaylandwindow_p.h.
|
protected |
Definition at line 282 of file qwaylandwindow_p.h.
|
protected |
Definition at line 286 of file qwaylandwindow_p.h.
|
protected |
Definition at line 281 of file qwaylandwindow_p.h.
|
protected |
Definition at line 299 of file qwaylandwindow_p.h.
|
protected |
Definition at line 288 of file qwaylandwindow_p.h.
|
protected |
Definition at line 289 of file qwaylandwindow_p.h.
|
protected |
Definition at line 277 of file qwaylandwindow_p.h.
|
protected |
Definition at line 305 of file qwaylandwindow_p.h.
|
protected |
Definition at line 313 of file qwaylandwindow_p.h.
|
protected |
Definition at line 312 of file qwaylandwindow_p.h.
|
protected |
Definition at line 310 of file qwaylandwindow_p.h.
|
protected |
Definition at line 260 of file qwaylandwindow_p.h.
|
protected |
Definition at line 261 of file qwaylandwindow_p.h.
|
protected |
Definition at line 303 of file qwaylandwindow_p.h.
Referenced by attachOffset(), and QtWaylandClient::QWaylandEglWindow::updateSurface().
|
protected |
Definition at line 311 of file qwaylandwindow_p.h.
|
protected |
Definition at line 316 of file qwaylandwindow_p.h.
|
protected |
Definition at line 317 of file qwaylandwindow_p.h.
|
protected |
Definition at line 298 of file qwaylandwindow_p.h.
|
protected |
Definition at line 297 of file qwaylandwindow_p.h.
|
protected |
Definition at line 294 of file qwaylandwindow_p.h.
|
protected |
Definition at line 304 of file qwaylandwindow_p.h.
|
protected |
Definition at line 302 of file qwaylandwindow_p.h.
|
protected |
Definition at line 253 of file qwaylandwindow_p.h.
|
protected |
Definition at line 254 of file qwaylandwindow_p.h.
Referenced by requestXdgActivationToken(), setXdgActivationToken(), and startSystemMove().
|
protected |
Definition at line 255 of file qwaylandwindow_p.h.
|
protected |
Definition at line 249 of file qwaylandwindow_p.h.
Referenced by ~QWaylandWindow(), and QtWaylandClient::QWaylandEglWindow::updateSurface().
|
mutableprotected |
Definition at line 248 of file qwaylandwindow_p.h.
Referenced by QtWaylandClient::QWaylandEglWindow::updateSurface().
|
protected |
Definition at line 321 of file qwaylandwindow_p.h.
|
protected |
Definition at line 251 of file qwaylandwindow_p.h.
|
protected |
Definition at line 285 of file qwaylandwindow_p.h.
|
protected |
Definition at line 292 of file qwaylandwindow_p.h.
|
protected |
Definition at line 283 of file qwaylandwindow_p.h.
|
protected |
Definition at line 295 of file qwaylandwindow_p.h.
|
protected |
Definition at line 258 of file qwaylandwindow_p.h.
Referenced by ~QWaylandWindow(), and QtWaylandClient::QWaylandEglWindow::updateSurface().
|
protected |
Definition at line 259 of file qwaylandwindow_p.h.
|
protected |
Definition at line 307 of file qwaylandwindow_p.h.
|
protected |
Definition at line 280 of file qwaylandwindow_p.h.