Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QtWaylandClient::QWaylandWindow Class Referenceabstract

#include <qwaylandwindow_p.h>

+ Inheritance diagram for QtWaylandClient::QWaylandWindow:
+ Collaboration diagram for QtWaylandClient::QWaylandWindow:

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.
 
QString windowTitle () const
 
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 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.
 
QWaylandSurfacewaylandSurface () const
 
::wl_surface * wlSurface () const
 
::wl_surface * surface () const override
 
QWaylandDisplaydisplay () const
 
QWaylandShellSurfaceshellSurface () const
 
std::any _surfaceRole () const override
 
QWaylandSubSurfacesubSurfaceWindow () const
 
QWaylandScreenwaylandScreen () const
 
void handleContentOrientationChange (Qt::ScreenOrientation orientation) override
 Handle changes to the orientation of the platform window's contents.
 
void updateBufferTransform ()
 
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 &region) 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.
 
QWaylandAbstractDecorationdecoration () 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 ()
 
QWaylandWindowtransientParent () const
 
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)
 
QWaylandShmBackingStorebackingStore () const
 
void setShellIntegration (QWaylandShellIntegration *shellIntegration)
 
QWaylandShellIntegrationshellIntegration () 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 ()
 
void sendRecursiveExposeEvent ()
 
virtual void reinit ()
 
void reset ()
 
bool windowEvent (QEvent *event) override
 Reimplement this method to be able to do any platform specific event handling.
 
- Public Member Functions inherited from QPlatformWindow
 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.
 
QWindowwindow () const
 Returns the window which belongs to the QPlatformWindow.
 
QPlatformWindowparent () const
 Returns the parent platform window (or \nullptr if orphan).
 
QPlatformScreenscreen () 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 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 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 setWindowFilePath (const QString &title)
 Reimplement to set the window file path to filePath.
 
virtual bool close ()
 Reimplement to let the platform handle non-spontaneous window close.
 
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 setOpacity (qreal level)
 Reimplement to be able to let Qt set the opacity level of a window.
 
virtual bool setWindowModified (bool modified)
 Reimplement to be able to let Qt indicate that the window has been modified.
 
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 invalidateSurface ()
 Invalidates the window's surface by releasing its surface buffers.
 
bool hasPendingUpdateRequest () const
 Returns true if the window has a pending update request.
 
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
 
- Public Member Functions inherited from QPlatformSurface
virtual ~QPlatformSurface ()
 
QSurfacesurface () const
 

Static Public Member Functions

static QWaylandWindowfromWlSurface (::wl_surface *surface)
 
static QWaylandWindowmouseGrab ()
 
- Static Public Member Functions inherited from QPlatformWindow
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 Public Member Functions inherited from QPlatformSurface
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)
 
- Protected Member Functions inherited from QPlatformWindow
QPlatformScreenscreenForGeometry (const QRect &newGeometry) const
 Helper function for finding the new screen for newGeometry in response to a geometry changed event.
 

Protected Attributes

QWaylandDisplaymDisplay = nullptr
 
QReadWriteLock mSurfaceLock
 
QScopedPointer< QWaylandSurfacemSurface
 
QScopedPointer< QWaylandFractionalScalemFractionalScale
 
QScopedPointer< QWaylandViewportmViewport
 
QWaylandShellIntegrationmShellIntegration = nullptr
 
QWaylandShellSurfacemShellSurface = nullptr
 
QWaylandSubSurfacemSubSurfaceWindow = nullptr
 
QList< QWaylandSubSurface * > mChildren
 
QWaylandAbstractDecorationmWindowDecoration = nullptr
 
bool mWindowDecorationEnabled = false
 
bool mMouseEventsInContentArea = false
 
Qt::MouseButtons mMousePressedInContentArea = Qt::NoButton
 
GestureState mGestureState = GestureNotActive
 
WId mWindowId
 
bool mFrameCallbackTimedOut = false
 
int mFrameCallbackCheckIntervalTimerId = -1
 
QAtomicInt mWaitingForUpdateDelivery = false
 
bool mWaitingForFrameCallback = false
 
QElapsedTimer mFrameCallbackElapsedTimer
 
struct::wl_callback * mFrameCallback = nullptr
 
QMutex mFrameSyncMutex
 
QWaitCondition mFrameSyncWait
 
bool mWaitingForUpdate = false
 
QRecursiveMutex mResizeLock
 
bool mWaitingToApplyConfigure = false
 
bool mCanResize = true
 
bool mResizeDirty = false
 
bool mResizeAfterSwap
 
int mFrameCallbackTimeout = 100
 
QVariantMap m_properties
 
bool mSentInitialResize = false
 
QPoint mOffset
 
qreal mScale = 1
 
QPlatformScreenmLastReportedScreen = nullptr
 
QString mWindowTitle
 
QIcon mWindowIcon
 
Qt::WindowFlags mFlags
 
QRegion mMask
 
QRegion mInputRegion
 
bool mTransparentInputRegion = false
 
QRegion mOpaqueArea
 
Qt::WindowStates mLastReportedWindowStates = Qt::WindowNoState
 
ToplevelWindowTilingStates mLastReportedToplevelWindowTilingStates = WindowNoState
 
QWaylandShmBackingStoremBackingStore = nullptr
 
QWaylandBuffermQueuedBuffer = nullptr
 
QRegion mQueuedBufferDamage
 
QMargins mCustomMargins
 
QPointer< QWaylandWindowmTransientParent
 
QList< QPointer< QWaylandWindow > > mChildPopups
 
Qt::ScreenOrientation mLastReportedContentOrientation = Qt::PrimaryOrientation
 
- Protected Attributes inherited from QPlatformWindow
QScopedPointer< QPlatformWindowPrivated_ptr
 

Friends

class QWaylandSubSurface
 

Additional Inherited Members

- Static Protected Member Functions inherited from QPlatformWindow
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].
 

Detailed Description

Definition at line 64 of file qwaylandwindow_p.h.

Member Enumeration Documentation

◆ GestureState

Enumerator
GestureNotActive 
GestureActiveInContentArea 
GestureActiveInDecoration 

Definition at line 273 of file qwaylandwindow_p.h.

◆ ToplevelWindowTilingState

Enumerator
WindowNoState 
WindowTiledLeft 
WindowTiledRight 
WindowTiledTop 
WindowTiledBottom 

Definition at line 75 of file qwaylandwindow_p.h.

◆ WindowType

Enumerator
Shm 
Egl 
Vulkan 

Definition at line 69 of file qwaylandwindow_p.h.

Constructor & Destructor Documentation

◆ QWaylandWindow()

QtWaylandClient::QWaylandWindow::QWaylandWindow ( QWindow * window,
QWaylandDisplay * display )

Definition at line 49 of file qwaylandwindow.cpp.

References connect(), ok, qEnvironmentVariableIntValue(), wlSurfaceCreated(), and wlSurfaceDestroyed().

+ Here is the call graph for this function:

◆ ~QWaylandWindow()

QtWaylandClient::QWaylandWindow::~QWaylandWindow ( )
override

Definition at line 75 of file qwaylandwindow.cpp.

References QWindowSystemInterface::handleCloseEvent(), mSurface, mWindowDecoration, QPlatformWindow::parent(), reset(), QGuiApplication::topLevelWindows(), and QPlatformWindow::window().

+ Here is the call graph for this function:

Member Function Documentation

◆ _surfaceRole()

std::any QtWaylandClient::QWaylandWindow::_surfaceRole ( ) const
override

Definition at line 952 of file qwaylandwindow.cpp.

References mShellSurface, mSubSurfaceWindow, and QtWaylandClient::QWaylandShellSurface::surfaceRole().

+ Here is the call graph for this function:

◆ addAttachOffset()

void QtWaylandClient::QWaylandWindow::addAttachOffset ( const QPoint point)

Definition at line 1732 of file qwaylandwindow.cpp.

References mOffset.

◆ applyConfigure

void QtWaylandClient::QWaylandWindow::applyConfigure ( )
slot

Definition at line 693 of file qwaylandwindow.cpp.

References doApplyConfigure(), QWindowSystemInterface::flushWindowSystemEvents(), lock, mCanResize, mResizeLock, mSentInitialResize, and sendRecursiveExposeEvent().

+ Here is the call graph for this function:

◆ applyConfigureWhenPossible()

void QtWaylandClient::QWaylandWindow::applyConfigureWhenPossible ( )

Definition at line 637 of file qwaylandwindow.cpp.

References QMetaObject::invokeMethod(), mResizeLock, mWaitingToApplyConfigure, 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ attach()

void QtWaylandClient::QWaylandWindow::attach ( QWaylandBuffer * buffer,
int x,
int y )

Definition at line 718 of file qwaylandwindow.cpp.

References handleUpdate(), mSurface, mSurfaceLock, and Q_ASSERT.

Referenced by attachOffset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ attachOffset() [1/2]

QPoint QtWaylandClient::QWaylandWindow::attachOffset ( ) const
inline

Definition at line 385 of file qwaylandwindow_p.h.

References mOffset.

Referenced by commit().

+ Here is the caller graph for this function:

◆ attachOffset() [2/2]

void QtWaylandClient::QWaylandWindow::attachOffset ( QWaylandBuffer * buffer)

Definition at line 739 of file qwaylandwindow.cpp.

References attach(), mOffset, QPoint::x(), and QPoint::y().

+ Here is the call graph for this function:

◆ backingStore()

QWaylandShmBackingStore * QtWaylandClient::QWaylandWindow::backingStore ( ) const
inline

Definition at line 211 of file qwaylandwindow_p.h.

◆ beginFrame()

void QtWaylandClient::QWaylandWindow::beginFrame ( )

Definition at line 275 of file qwaylandwindow.cpp.

References mSurfaceLock.

Referenced by QtWaylandClient::QWaylandGLContext::beginFrame().

+ Here is the caller graph for this function:

◆ clientSideMargins()

QMargins QtWaylandClient::QWaylandWindow::clientSideMargins ( ) const

Definition at line 886 of file qwaylandwindow.cpp.

References QtWaylandClient::QWaylandAbstractDecoration::margins(), mWindowDecoration, and mWindowDecorationEnabled.

Referenced by QtWaylandClient::QWaylandEglWindow::contentsRect(), handleMouse(), mapFromWlSurface(), repositionFromApplyConfigure(), resizeFromApplyConfigure(), setGeometryFromApplyConfigure(), QtWaylandClient::QWaylandXdgSurface::setSizeHints(), surfaceSize(), and QtWaylandClient::QWaylandEglWindow::updateSurface().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ closeChildPopups()

void QtWaylandClient::QWaylandWindow::closeChildPopups ( )

Definition at line 1806 of file qwaylandwindow.cpp.

References mChildPopups.

Referenced by reset().

+ Here is the caller graph for this function:

◆ commit() [1/2]

void QtWaylandClient::QWaylandWindow::commit ( )

Definition at line 808 of file qwaylandwindow.cpp.

References mSurface, and mSurfaceLock.

Referenced by safeCommit(), and QtWaylandClient::QWaylandBrcmEglWindow::swapBuffers().

+ Here is the caller graph for this function:

◆ commit() [2/2]

void QtWaylandClient::QWaylandWindow::commit ( QWaylandBuffer * buffer,
const QRegion & damage )

Definition at line 777 of file qwaylandwindow.cpp.

References attachOffset(), damage(), isExposed(), mSurface, mSurfaceLock, Q_ASSERT, qCDebug, rect, scale(), and QRectF::toAlignedRect().

+ Here is the call graph for this function:

◆ createDecoration()

◆ damage()

void QtWaylandClient::QWaylandWindow::damage ( const QRect & rect)

Definition at line 745 of file qwaylandwindow.cpp.

References mSurface, mSurfaceLock, rect, scale(), and QRectF::toAlignedRect().

Referenced by commit(), QtWaylandClient::QWaylandAbstractDecoration::contentImage(), and safeCommit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ decoration()

QWaylandAbstractDecoration * QtWaylandClient::QWaylandWindow::decoration ( ) const

Definition at line 1159 of file qwaylandwindow.cpp.

References mWindowDecoration, and mWindowDecorationEnabled.

Referenced by QtWaylandClient::QWaylandEglWindow::bindContentFBO(), QtWaylandClient::QWaylandEglWindow::contentFBO(), createDecoration(), and QtWaylandClient::QWaylandShmBackingStore::windowDecoration().

+ Here is the caller graph for this function:

◆ defaultGeometry()

QRect QtWaylandClient::QWaylandWindow::defaultGeometry ( ) const
protectedvirtual

Definition at line 416 of file qwaylandwindow.cpp.

◆ deliverUpdateRequest()

void QtWaylandClient::QWaylandWindow::deliverUpdateRequest ( )
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 1725 of file qwaylandwindow.cpp.

References QPlatformWindow::deliverUpdateRequest(), mWaitingForUpdate, and qCDebug.

Referenced by doHandleFrameCallback(), reinit(), and requestUpdate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ devicePixelRatio()

qreal QtWaylandClient::QWaylandWindow::devicePixelRatio ( ) const
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.

See also
QPlatformWindow::devicePixelRatio();

Reimplemented from QPlatformWindow.

Definition at line 1548 of file qwaylandwindow.cpp.

References mScale.

Referenced by scale().

+ Here is the caller graph for this function:

◆ display()

QWaylandDisplay * QtWaylandClient::QWaylandWindow::display ( ) const
inline

Definition at line 138 of file qwaylandwindow_p.h.

Referenced by QtWaylandClient::QWaylandWlShellSurface::QWaylandWlShellSurface(), QtWaylandClient::QWaylandXdgSurface::QWaylandXdgSurface(), QtWaylandClient::QWaylandShellSurface::handleActivationChanged(), and startSystemResize().

+ Here is the caller graph for this function:

◆ doApplyConfigure()

void QtWaylandClient::QWaylandWindow::doApplyConfigure ( )

Definition at line 646 of file qwaylandwindow.cpp.

References QtWaylandClient::QWaylandShellSurface::applyConfigure(), QThread::currentThreadId(), QThreadData::get2(), mShellSurface, mWaitingToApplyConfigure, and Q_ASSERT_X.

Referenced by applyConfigure(), and setCanResize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doHandleFrameCallback()

void QtWaylandClient::QWaylandWindow::doHandleFrameCallback ( )
protectedvirtual

Definition at line 847 of file qwaylandwindow.cpp.

References deliverUpdateRequest(), QPlatformWindow::geometry(), QPlatformWindow::hasPendingUpdateRequest(), isExposed(), mFrameCallbackTimedOut, mWaitingForUpdateDelivery, sendExposeEvent(), and QBasicAtomicInteger< T >::storeRelease().

+ Here is the call graph for this function:

◆ endFrame()

void QtWaylandClient::QWaylandWindow::endFrame ( )

Definition at line 280 of file qwaylandwindow.cpp.

References mSurfaceLock.

Referenced by QtWaylandClient::QWaylandGLContext::endFrame().

+ Here is the caller graph for this function:

◆ ensureSize()

void QtWaylandClient::QWaylandWindow::ensureSize ( )
virtual

Reimplemented in QtWaylandClient::QWaylandEglWindow.

Definition at line 94 of file qwaylandwindow.cpp.

References mBackingStore, QtWaylandClient::QWaylandShmBackingStore::recreateBackBufferIfNeeded(), and setBackingStore().

+ Here is the call graph for this function:

◆ frameMargins()

QMargins QtWaylandClient::QWaylandWindow::frameMargins ( ) const
overridevirtual

Reimplemented from QPlatformWindow.

Definition at line 876 of file qwaylandwindow.cpp.

References QPlatformWindow::frameMargins(), QtWaylandClient::QWaylandAbstractDecoration::margins(), mShellSurface, mWindowDecoration, mWindowDecorationEnabled, and QtWaylandClient::QWaylandShellSurface::serverSideFrameMargins().

Referenced by createDecoration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromWlSurface()

QWaylandWindow * QtWaylandClient::QWaylandWindow::fromWlSurface ( ::wl_surface * surface)
static

Definition at line 346 of file qwaylandwindow.cpp.

References QtWaylandClient::QWaylandSurface::fromWlSurface(), and surface().

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleContentOrientationChange()

void QtWaylandClient::QWaylandWindow::handleContentOrientationChange ( Qt::ScreenOrientation orientation)
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.

See also
QWindow::reportContentOrientationChange()

Reimplemented from QPlatformWindow.

Definition at line 975 of file qwaylandwindow.cpp.

References mLastReportedContentOrientation, and updateBufferTransform().

+ Here is the call graph for this function:

◆ handleMouse()

◆ handlePinchGesture()

◆ handleSwipeGesture()

◆ handleToplevelWindowTilingStatesChanged()

void QtWaylandClient::QWaylandWindow::handleToplevelWindowTilingStatesChanged ( ToplevelWindowTilingStates states)

Definition at line 1569 of file qwaylandwindow.cpp.

References mLastReportedToplevelWindowTilingStates.

◆ handleUpdate()

void QtWaylandClient::QWaylandWindow::handleUpdate ( )

Definition at line 1690 of file qwaylandwindow.cpp.

References QThread::currentThread(), QtWaylandClient::QWaylandDisplay::frameEventQueue(), QMetaObject::invokeMethod(), lock, mDisplay, mFrameCallback, mFrameCallbackCheckIntervalTimerId, mFrameCallbackElapsedTimer, mFrameCallbackTimeout, mFrameSyncMutex, mSurface, mSurfaceLock, mWaitingForFrameCallback, mWaitingForUpdate, qCDebug, Qt::QueuedConnection, and QElapsedTimer::start().

Referenced by attach().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleWindowStatesChanged()

void QtWaylandClient::QWaylandWindow::handleWindowStatesChanged ( Qt::WindowStates states)

Definition at line 1579 of file qwaylandwindow.cpp.

References createDecoration(), QWindowSystemInterface::handleWindowStateChanged(), mLastReportedWindowStates, and QPlatformWindow::window().

Referenced by QtWaylandClient::QWaylandWlShellSurface::applyConfigure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActive()

bool QtWaylandClient::QWaylandWindow::isActive ( ) const
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 1538 of file qwaylandwindow.cpp.

References QtWaylandClient::QWaylandDisplay::isWindowActivated(), and mDisplay.

+ Here is the call graph for this function:

◆ isAlertState()

bool QtWaylandClient::QWaylandWindow::isAlertState ( ) const
overridevirtual

Reimplement this method return whether the window is in an alert state.

See also
setAlertState()
Since
5.1

Reimplemented from QPlatformWindow.

Definition at line 629 of file qwaylandwindow.cpp.

References QtWaylandClient::QWaylandShellSurface::isAlertState(), and mShellSurface.

+ Here is the call graph for this function:

◆ isExposed()

bool QtWaylandClient::QWaylandWindow::isExposed ( ) const
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 1521 of file qwaylandwindow.cpp.

References QtWaylandClient::QWaylandShellSurface::isExposed(), isExposed(), isVisible(), mFrameCallbackTimedOut, mShellSurface, mSubSurfaceWindow, QtWaylandClient::QWaylandSubSurface::parent(), and QPlatformWindow::window().

Referenced by commit(), doHandleFrameCallback(), isExposed(), QtWaylandClient::QWaylandGLContext::makeCurrent(), safeCommit(), sendRecursiveExposeEvent(), and setGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lower()

void QtWaylandClient::QWaylandWindow::lower ( )
overridevirtual

Reimplement to be able to let Qt lower windows to the bottom of the desktop.

Reimplemented from QPlatformWindow.

Definition at line 596 of file qwaylandwindow.cpp.

References QtWaylandClient::QWaylandShellSurface::lower(), and mShellSurface.

+ Here is the call graph for this function:

◆ mapFromWlSurface()

QPointF QtWaylandClient::QWaylandWindow::mapFromWlSurface ( const QPointF & surfacePosition) const

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 935 of file qwaylandwindow.cpp.

References clientSideMargins(), QMargins::left(), QMargins::top(), QPointF::x(), and QPointF::y().

Referenced by QtWaylandClient::QWaylandTabletToolV2::zwp_tablet_tool_v2_frame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mouseGrab()

static QWaylandWindow * QtWaylandClient::QWaylandWindow::mouseGrab ( )
inlinestatic

Definition at line 197 of file qwaylandwindow_p.h.

◆ propagateSizeHints()

void QtWaylandClient::QWaylandWindow::propagateSizeHints ( )
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 1737 of file qwaylandwindow.cpp.

References mShellSurface, and QtWaylandClient::QWaylandShellSurface::propagateSizeHints().

Referenced by createDecoration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ properties()

QVariantMap QtWaylandClient::QWaylandWindow::properties ( ) const

Definition at line 1607 of file qwaylandwindow.cpp.

References m_properties.

Referenced by QtWaylandClient::QWaylandNativeInterface::windowProperties().

+ Here is the caller graph for this function:

◆ property() [1/2]

QVariant QtWaylandClient::QWaylandWindow::property ( const QString & name)

Definition at line 1612 of file qwaylandwindow.cpp.

References m_properties, and QMap< Key, T >::value().

Referenced by QtWaylandClient::QWaylandNativeInterface::windowProperty(), and QtWaylandClient::QWaylandNativeInterface::windowProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ property() [2/2]

QVariant QtWaylandClient::QWaylandWindow::property ( const QString & name,
const QVariant & defaultValue )

Definition at line 1617 of file qwaylandwindow.cpp.

References m_properties, and QMap< Key, T >::value().

+ Here is the call graph for this function:

◆ raise()

void QtWaylandClient::QWaylandWindow::raise ( )
overridevirtual

Reimplement to be able to let Qt raise windows to the top of the desktop.

Reimplemented from QPlatformWindow.

Definition at line 589 of file qwaylandwindow.cpp.

References mShellSurface, and QtWaylandClient::QWaylandShellSurface::raise().

+ Here is the call graph for this function:

◆ reinit()

void QtWaylandClient::QWaylandWindow::reinit ( )
virtual

Definition at line 1813 of file qwaylandwindow.cpp.

References deliverUpdateRequest(), QPlatformWindow::hasPendingUpdateRequest(), isVisible(), and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ repositionFromApplyConfigure()

void QtWaylandClient::QWaylandWindow::repositionFromApplyConfigure ( const QPoint & position)

Definition at line 521 of file qwaylandwindow.cpp.

References clientSideMargins(), QPlatformWindow::geometry(), QMargins::left(), setGeometry(), QMargins::top(), and QPlatformWindow::windowGeometry().

Referenced by QtWaylandClient::QWaylandShellSurface::repositionFromApplyConfigure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ requestActivateWindow()

void QtWaylandClient::QWaylandWindow::requestActivateWindow ( )
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::handleFocusWindowChanged(QWindow *w) would be sufficient.

If the window system has some event handling/callbacks then call QWindowSystemInterface::handleFocusWindowChanged(QWindow *w) when the window system gives the notification.

Default implementation calls QWindowSystem::handleFocusWindowChanged(QWindow *w)

Reimplemented from QPlatformWindow.

Definition at line 1515 of file qwaylandwindow.cpp.

References mShellSurface, and QtWaylandClient::QWaylandShellSurface::requestActivate().

+ Here is the call graph for this function:

◆ requestUpdate()

void QtWaylandClient::QWaylandWindow::requestUpdate ( )
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 1654 of file qwaylandwindow.cpp.

References deliverUpdateRequest(), QPlatformWindow::hasPendingUpdateRequest(), QMetaObject::invokeMethod(), mFrameSyncMutex, mWaitingForFrameCallback, mWaitingForUpdate, Q_ASSERT, qCDebug, and Qt::QueuedConnection.

+ Here is the call graph for this function:

◆ requestXdgActivationToken()

void QtWaylandClient::QWaylandWindow::requestXdgActivationToken ( uint serial)
override

Definition at line 1782 of file qwaylandwindow.cpp.

References mShellSurface, and QtWaylandClient::QWaylandShellSurface::requestXdgActivationToken().

+ Here is the call graph for this function:

◆ reset()

void QtWaylandClient::QWaylandWindow::reset ( )

◆ resizeFromApplyConfigure()

void QtWaylandClient::QWaylandWindow::resizeFromApplyConfigure ( const QSize & sizeWithMargins,
const QPoint & offset = {0, 0} )

Definition at line 532 of file qwaylandwindow.cpp.

References QMargins::bottom(), clientSideMargins(), QPlatformWindow::geometry(), QMargins::left(), mOffset, qMax(), QMargins::right(), setGeometry(), QMargins::top(), and QPlatformWindow::windowGeometry().

Referenced by QtWaylandClient::QWaylandIviSurface::applyConfigure(), QtWaylandClient::QWaylandWlShellSurface::applyConfigure(), and QtWaylandClient::QWaylandShellSurface::resizeFromApplyConfigure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ safeCommit()

void QtWaylandClient::QWaylandWindow::safeCommit ( QWaylandBuffer * buffer,
const QRegion & damage )

Definition at line 763 of file qwaylandwindow.cpp.

References commit(), damage(), isExposed(), mQueuedBuffer, mQueuedBufferDamage, and QtWaylandClient::QWaylandBuffer::setBusy().

Referenced by QtWaylandClient::QWaylandShmBackingStore::flush().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scale()

qreal QtWaylandClient::QWaylandWindow::scale ( ) const

Definition at line 1543 of file qwaylandwindow.cpp.

References devicePixelRatio().

Referenced by commit(), QtWaylandClient::QWaylandEglWindow::contentFBO(), QtWaylandClient::QWaylandAbstractDecoration::contentImage(), damage(), QtWaylandClient::QWaylandShmBackingStore::recreateBackBufferIfNeeded(), and QtWaylandClient::QWaylandEglWindow::updateSurface().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendExposeEvent()

void QtWaylandClient::QWaylandWindow::sendExposeEvent ( const QRect & rect)
protected

Definition at line 545 of file qwaylandwindow.cpp.

References QtWaylandClient::QWaylandShellSurface::handleExpose(), QWindowSystemInterface::handleExposeEvent(), mShellSurface, qCDebug, rect, and QPlatformWindow::window().

Referenced by doHandleFrameCallback(), sendRecursiveExposeEvent(), setCanResize(), setGeometry(), setVisible(), timerEvent(), and waitForFrameSync().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendProperty()

void QtWaylandClient::QWaylandWindow::sendProperty ( const QString & name,
const QVariant & value )

Definition at line 1589 of file qwaylandwindow.cpp.

References QtWaylandClient::QWaylandNativeInterface::emitWindowPropertyChanged(), QMap< Key, T >::insert(), m_properties, mShellSurface, QGuiApplication::platformNativeInterface(), and QtWaylandClient::QWaylandShellSurface::sendProperty().

Referenced by QtWaylandClient::QWaylandNativeInterface::setWindowProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendRecursiveExposeEvent()

void QtWaylandClient::QWaylandWindow::sendRecursiveExposeEvent ( )

Definition at line 705 of file qwaylandwindow.cpp.

References QPlatformWindow::geometry(), isExposed(), mChildren, and sendExposeEvent().

Referenced by applyConfigure(), setCanResize(), and QtWaylandClient::QWaylandXdgSurface::xdg_surface_configure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAlertState()

void QtWaylandClient::QWaylandWindow::setAlertState ( bool enable)
overridevirtual

Reimplement this method to set whether the window demands attention (for example, by flashing the taskbar icon) depending on enabled.

See also
isAlertState()
Since
5.1

Reimplemented from QPlatformWindow.

Definition at line 623 of file qwaylandwindow.cpp.

References mShellSurface, and QtWaylandClient::QWaylandShellSurface::setAlertState().

+ Here is the call graph for this function:

◆ setBackingStore()

void QtWaylandClient::QWaylandWindow::setBackingStore ( QWaylandShmBackingStore * backingStore)
inline

Definition at line 209 of file qwaylandwindow_p.h.

Referenced by QtWaylandClient::QWaylandShmBackingStore::beginPaint(), and ensureSize().

+ Here is the caller graph for this function:

◆ setCanResize()

void QtWaylandClient::QWaylandWindow::setCanResize ( bool canResize)

Definition at line 669 of file qwaylandwindow.cpp.

References QThread::currentThreadId(), doApplyConfigure(), QPlatformWindow::geometry(), QThreadData::get2(), QWindowSystemInterface::handleGeometryChange(), QMetaObject::invokeMethod(), lock, mCanResize, mResizeDirty, mResizeLock, mWaitingToApplyConfigure, Qt::QueuedConnection, sendExposeEvent(), sendRecursiveExposeEvent(), and QPlatformWindow::window().

Referenced by QtWaylandClient::QWaylandGLContext::makeCurrent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCustomMargins()

void QtWaylandClient::QWaylandWindow::setCustomMargins ( const QMargins & margins)
override

Definition at line 891 of file qwaylandwindow.cpp.

References QPlatformWindow::geometry(), mCustomMargins, and setGeometry().

+ Here is the call graph for this function:

◆ setGeometry()

void QtWaylandClient::QWaylandWindow::setGeometry ( const QRect & rect)
overridevirtual

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 439 of file qwaylandwindow.cpp.

References Egl, fixedToplevelPositions, QPlatformWindow::geometry(), QWindowSystemInterface::handleGeometryChange(), QRegion::isEmpty(), isExposed(), isVisible(), lock, mMask, mResizeAfterSwap, mResizeDirty, mResizeLock, mSentInitialResize, mShellSurface, mWindowDecoration, mWindowDecorationEnabled, QPlatformWindow::parent(), Qt::Popup, qt_window_private(), rect, QPlatformWindow::screen(), sendExposeEvent(), QtWaylandClient::QWaylandShellSurface::setWindowGeometry(), QtWaylandClient::QWaylandShellSurface::setWindowPosition(), Qt::ToolTip, QtWaylandClient::QWaylandAbstractDecoration::update(), QPlatformWindow::window(), windowContentGeometry(), QPlatformWindow::windowGeometry(), and windowType().

Referenced by createDecoration(), repositionFromApplyConfigure(), resizeFromApplyConfigure(), setCustomMargins(), QtWaylandClient::QWaylandBrcmEglWindow::setGeometry(), QtWaylandClient::QWaylandEglWindow::setGeometry(), setGeometryFromApplyConfigure(), and setVisible().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setGeometryFromApplyConfigure()

void QtWaylandClient::QWaylandWindow::setGeometryFromApplyConfigure ( const QPoint & globalPosition,
const QSize & sizeWithMargins )

Definition at line 506 of file qwaylandwindow.cpp.

References QMargins::bottom(), clientSideMargins(), QPlatformWindow::geometry(), QMargins::left(), qMax(), QMargins::right(), setGeometry(), and QMargins::top().

Referenced by QtWaylandClient::QWaylandShellSurface::setGeometryFromApplyConfigure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setKeyboardGrabEnabled()

bool QtWaylandClient::QWaylandWindow::setKeyboardGrabEnabled ( bool )
inlineoverridevirtual

Reimplemented from QPlatformWindow.

Definition at line 216 of file qwaylandwindow_p.h.

◆ setMask()

void QtWaylandClient::QWaylandWindow::setMask ( const QRegion & region)
overridevirtual

Reimplement to be able to let Qt set the mask of a window.

Reimplemented from QPlatformWindow.

Definition at line 602 of file qwaylandwindow.cpp.

References QPlatformWindow::geometry(), QRegion::isEmpty(), mMask, mSurface, and mSurfaceLock.

+ Here is the call graph for this function:

◆ setMouseGrabEnabled()

bool QtWaylandClient::QWaylandWindow::setMouseGrabEnabled ( bool grab)
overridevirtual

Reimplemented from QPlatformWindow.

Definition at line 1553 of file qwaylandwindow.cpp.

References Qt::Popup, qWarning, this, and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ setOrientationMask()

void QtWaylandClient::QWaylandWindow::setOrientationMask ( Qt::ScreenOrientations mask)

Definition at line 1023 of file qwaylandwindow.cpp.

References mShellSurface, and QtWaylandClient::QWaylandShellSurface::setContentOrientationMask().

+ Here is the call graph for this function:

◆ setParent()

void QtWaylandClient::QWaylandWindow::setParent ( const QPlatformWindow * parent)
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 358 of file qwaylandwindow.cpp.

References QtWaylandClient::QWaylandDisplay::createSubSurface(), isVisible(), mDisplay, mSubSurfaceWindow, QPlatformWindow::parent(), QtWaylandClient::QWaylandSubSurface::parent(), QWaylandSubSurface, reset(), and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ setProperty()

void QtWaylandClient::QWaylandWindow::setProperty ( const QString & name,
const QVariant & value )

Definition at line 1599 of file qwaylandwindow.cpp.

References QtWaylandClient::QWaylandNativeInterface::emitWindowPropertyChanged(), QMap< Key, T >::insert(), m_properties, and QGuiApplication::platformNativeInterface().

Referenced by QtWaylandClient::QWaylandExtendedSurface::extended_surface_set_generic_property().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setShellIntegration()

void QtWaylandClient::QWaylandWindow::setShellIntegration ( QWaylandShellIntegration * shellIntegration)

Definition at line 243 of file qwaylandwindow.cpp.

References mShellIntegration, mShellSurface, Q_ASSERT, qCWarning, and shellIntegration().

+ Here is the call graph for this function:

◆ setVisible()

void QtWaylandClient::QWaylandWindow::setVisible ( bool visible)
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 565 of file qwaylandwindow.cpp.

References mShellSurface, QtWaylandClient::QWaylandShellSurface::requestActivateOnShow(), reset(), sendExposeEvent(), setGeometry(), and QPlatformWindow::windowGeometry().

+ Here is the call graph for this function:

◆ setWindowFlags()

void QtWaylandClient::QWaylandWindow::setWindowFlags ( Qt::WindowFlags flags)
overridevirtual

Requests setting the window flags of this surface to flags.

Reimplemented from QPlatformWindow.

Definition at line 1035 of file qwaylandwindow.cpp.

References createDecoration(), mFlags, mShellSurface, mSurfaceLock, and QtWaylandClient::QWaylandShellSurface::setWindowFlags().

+ Here is the call graph for this function:

◆ setWindowIcon()

void QtWaylandClient::QWaylandWindow::setWindowIcon ( const QIcon & icon)
overridevirtual

Reimplement to set the window icon to icon.

Reimplemented from QPlatformWindow.

Definition at line 408 of file qwaylandwindow.cpp.

References icon, isVisible(), mWindowDecoration, mWindowDecorationEnabled, mWindowIcon, QtWaylandClient::QWaylandAbstractDecoration::update(), and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ setWindowState()

void QtWaylandClient::QWaylandWindow::setWindowState ( Qt::WindowStates state)
overridevirtual

Requests setting the window state of this surface to type.

Qt::WindowActive can be ignored.

Reimplemented from QPlatformWindow.

Definition at line 1029 of file qwaylandwindow.cpp.

References mShellSurface, and QtWaylandClient::QWaylandShellSurface::requestWindowStates().

+ Here is the call graph for this function:

◆ setWindowTitle()

void QtWaylandClient::QWaylandWindow::setWindowTitle ( const QString & title)
overridevirtual

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.

See also
QGuiApplication::applicationDisplayName()

Reimplemented from QPlatformWindow.

Definition at line 382 of file qwaylandwindow.cpp.

References QPlatformWindow::formatWindowTitle(), QString::fromUtf8(), isVisible(), QStringView::left(), mShellSurface, mWindowDecoration, mWindowDecorationEnabled, mWindowTitle, qCWarning, QtWaylandClient::QWaylandShellSurface::setTitle(), title, QtWaylandClient::QWaylandAbstractDecoration::update(), and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ setXdgActivationToken()

void QtWaylandClient::QWaylandWindow::setXdgActivationToken ( const QString & token)

Definition at line 1787 of file qwaylandwindow.cpp.

References mShellSurface, QtWaylandClient::QWaylandShellSurface::setXdgActivationToken(), and token.

+ Here is the call graph for this function:

◆ shellIntegration()

QWaylandShellIntegration * QtWaylandClient::QWaylandWindow::shellIntegration ( ) const
inline

Definition at line 214 of file qwaylandwindow_p.h.

Referenced by QtWaylandClient::QWaylandNativeInterface::nativeResourceForWindow(), and setShellIntegration().

+ Here is the caller graph for this function:

◆ shellSurface()

QWaylandShellSurface * QtWaylandClient::QWaylandWindow::shellSurface ( ) const

Definition at line 947 of file qwaylandwindow.cpp.

References mShellSurface.

Referenced by QtWaylandClient::QWaylandAdwaitaDecoration::handleTouch().

+ Here is the caller graph for this function:

◆ startSystemMove()

bool QtWaylandClient::QWaylandWindow::startSystemMove ( )
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.

Since
5.15

Reimplemented from QPlatformWindow.

Definition at line 1753 of file qwaylandwindow.cpp.

◆ startSystemResize()

bool QtWaylandClient::QWaylandWindow::startSystemResize ( Qt::Edges edges)
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.

Since
5.15

Reimplemented from QPlatformWindow.

Definition at line 1743 of file qwaylandwindow.cpp.

References display(), mShellSurface, and QtWaylandClient::QWaylandShellSurface::resize().

+ Here is the call graph for this function:

◆ subSurfaceWindow()

QWaylandSubSurface * QtWaylandClient::QWaylandWindow::subSurfaceWindow ( ) const

Definition at line 961 of file qwaylandwindow.cpp.

References mSubSurfaceWindow.

◆ surface()

::wl_surface * QtWaylandClient::QWaylandWindow::surface ( ) const
inlineoverride

Definition at line 132 of file qwaylandwindow_p.h.

Referenced by fromWlSurface().

+ Here is the caller graph for this function:

◆ surfaceSize()

QSize QtWaylandClient::QWaylandWindow::surfaceSize ( ) const

Size, with decorations (including including eventual shadows) in wl_surface coordinates.

Definition at line 900 of file qwaylandwindow.cpp.

References clientSideMargins(), and QPlatformWindow::geometry().

Referenced by QtWaylandClient::QWaylandAbstractDecoration::contentImage(), QtWaylandClient::QWaylandBradientDecoration::handleMouse(), handleMouse(), QtWaylandClient::QWaylandBradientDecoration::handleTouch(), and windowContentGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ timerEvent()

void QtWaylandClient::QWaylandWindow::timerEvent ( QTimerEvent * event)
override

Definition at line 1629 of file qwaylandwindow.cpp.

References QElapsedTimer::hasExpired(), QElapsedTimer::invalidate(), QElapsedTimer::isValid(), lock, mFrameCallbackCheckIntervalTimerId, mFrameCallbackElapsedTimer, mFrameCallbackTimedOut, mFrameCallbackTimeout, mFrameSyncMutex, mWaitingForUpdate, qCDebug, and sendExposeEvent().

+ Here is the call graph for this function:

◆ toplevelWindowTilingStates()

QWaylandWindow::ToplevelWindowTilingStates QtWaylandClient::QWaylandWindow::toplevelWindowTilingStates ( ) const

Definition at line 1564 of file qwaylandwindow.cpp.

References mLastReportedToplevelWindowTilingStates.

Referenced by QtWaylandClient::QWaylandAdwaitaDecoration::margins().

+ Here is the caller graph for this function:

◆ touchDragDecoration()

bool QtWaylandClient::QWaylandWindow::touchDragDecoration ( QWaylandInputDevice * inputDevice,
const QPointF & local,
const QPointF & global,
QEventPoint::State state,
Qt::KeyboardModifiers mods )

Definition at line 1367 of file qwaylandwindow.cpp.

References global, QtWaylandClient::QWaylandAbstractDecoration::handleTouch(), mWindowDecoration, mWindowDecorationEnabled, and state.

+ Here is the call graph for this function:

◆ transientParent()

QWaylandWindow * QtWaylandClient::QWaylandWindow::transientParent ( ) const

Definition at line 1175 of file qwaylandwindow.cpp.

References mTransientParent.

Referenced by QtWaylandClient::QWaylandWlShellSurface::QWaylandWlShellSurface(), and QtWaylandClient::QWaylandXdgSurface::QWaylandXdgSurface().

+ Here is the caller graph for this function:

◆ updateBufferTransform()

void QtWaylandClient::QWaylandWindow::updateBufferTransform ( )

Definition at line 981 of file qwaylandwindow.cpp.

References Qt::InvertedLandscapeOrientation, Qt::InvertedPortraitOrientation, Qt::LandscapeOrientation, mLastReportedContentOrientation, mSurface, mSurfaceLock, Qt::PortraitOrientation, Qt::PrimaryOrientation, QPlatformWindow::screen(), waylandScreen(), and QPlatformWindow::window().

Referenced by handleContentOrientationChange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ waitForFrameSync()

bool QtWaylandClient::QWaylandWindow::waitForFrameSync ( int timeout)

Definition at line 859 of file qwaylandwindow.cpp.

References deadline, mFrameCallbackTimedOut, mFrameSyncMutex, mFrameSyncWait, mWaitingForFrameCallback, mWaitingForUpdate, qCDebug, sendExposeEvent(), and QWaitCondition::wait().

+ Here is the call graph for this function:

◆ waylandScreen()

QWaylandScreen * QtWaylandClient::QWaylandWindow::waylandScreen ( ) const

Definition at line 966 of file qwaylandwindow.cpp.

References Q_ASSERT, and QPlatformWindow::screen().

Referenced by QtWaylandClient::QWaylandFullScreenShellV1Surface::QWaylandFullScreenShellV1Surface(), and updateBufferTransform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ waylandSurface()

QWaylandSurface * QtWaylandClient::QWaylandWindow::waylandSurface ( ) const
inline

Definition at line 130 of file qwaylandwindow_p.h.

◆ windowContentGeometry()

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 922 of file qwaylandwindow.cpp.

References QMargins::left(), surfaceSize(), QMargins::top(), and windowContentMargins().

Referenced by QtWaylandClient::QWaylandAdwaitaDecoration::handleMouse(), QtWaylandClient::QWaylandAdwaitaDecoration::paint(), and setGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ windowContentMargins()

QMargins QtWaylandClient::QWaylandWindow::windowContentMargins ( ) const

Definition at line 905 of file qwaylandwindow.cpp.

References QMargins::isNull(), QtWaylandClient::QWaylandAbstractDecoration::margins(), mCustomMargins, mWindowDecoration, mWindowDecorationEnabled, and QtWaylandClient::QWaylandAbstractDecoration::ShadowsOnly.

Referenced by QtWaylandClient::QWaylandXdgSurface::setSizeHints(), and windowContentGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ windowEvent()

bool QtWaylandClient::QWaylandWindow::windowEvent ( QEvent * event)
overridevirtual

Reimplement this method to be able to do any platform specific event handling.

All non-synthetic events for window() are passed to this function before being sent to QWindow::event().

Return true if the event should not be passed on to the QWindow.

Subclasses should always call the base class implementation.

Reimplemented from QPlatformWindow.

Definition at line 1822 of file qwaylandwindow.cpp.

References QEvent::ApplicationFontChange, QEvent::ApplicationPaletteChange, isVisible(), mWindowDecoration, mWindowDecorationEnabled, QtWaylandClient::QWaylandAbstractDecoration::update(), QPlatformWindow::window(), and QPlatformWindow::windowEvent().

+ Here is the call graph for this function:

◆ windowIcon()

QIcon QtWaylandClient::QWaylandWindow::windowIcon ( ) const
inline

Definition at line 380 of file qwaylandwindow_p.h.

Referenced by QtWaylandClient::QWaylandBradientDecoration::paint().

+ Here is the caller graph for this function:

◆ windowStates()

Qt::WindowStates QtWaylandClient::QWaylandWindow::windowStates ( ) const

Definition at line 1574 of file qwaylandwindow.cpp.

References mLastReportedWindowStates.

◆ windowTitle()

QString QtWaylandClient::QWaylandWindow::windowTitle ( ) const

Definition at line 377 of file qwaylandwindow.cpp.

References mWindowTitle.

Referenced by QtWaylandClient::QWaylandAdwaitaDecoration::paint(), and QtWaylandClient::QWaylandBradientDecoration::paint().

+ Here is the caller graph for this function:

◆ windowType()

virtual WindowType QtWaylandClient::QWaylandWindow::windowType ( ) const
pure virtual

Implemented in QtWaylandClient::QWaylandShmWindow, QtWaylandClient::QWaylandVulkanWindow, QtWaylandClient::QWaylandBrcmEglWindow, and QtWaylandClient::QWaylandEglWindow.

Referenced by setGeometry().

+ Here is the caller graph for this function:

◆ winId()

WId QtWaylandClient::QWaylandWindow::winId ( ) const
overridevirtual

Reimplement in subclasses to return a handle to the native window.

Reimplemented from QPlatformWindow.

Definition at line 353 of file qwaylandwindow.cpp.

References mWindowId.

◆ wlSurface()

◆ wlSurfaceCreated

void QtWaylandClient::QWaylandWindow::wlSurfaceCreated ( )
signal

Referenced by QWaylandWindow().

+ Here is the caller graph for this function:

◆ wlSurfaceDestroyed

void QtWaylandClient::QWaylandWindow::wlSurfaceDestroyed ( )
signal

Referenced by QWaylandWindow(), and reset().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QWaylandSubSurface

friend class QWaylandSubSurface
friend

Definition at line 375 of file qwaylandwindow_p.h.

Referenced by setParent().

Member Data Documentation

◆ fixedToplevelPositions

◆ m_properties

QVariantMap QtWaylandClient::QWaylandWindow::m_properties
protected

Definition at line 309 of file qwaylandwindow_p.h.

Referenced by properties(), property(), property(), sendProperty(), and setProperty().

◆ mBackingStore

QWaylandShmBackingStore* QtWaylandClient::QWaylandWindow::mBackingStore = nullptr
protected

Definition at line 330 of file qwaylandwindow_p.h.

Referenced by ensureSize().

◆ mCanResize

bool QtWaylandClient::QWaylandWindow::mCanResize = true
protected

Definition at line 305 of file qwaylandwindow_p.h.

Referenced by applyConfigure(), reset(), and setCanResize().

◆ mChildPopups

QList<QPointer<QWaylandWindow> > QtWaylandClient::QWaylandWindow::mChildPopups
protected

Definition at line 337 of file qwaylandwindow_p.h.

Referenced by closeChildPopups().

◆ mChildren

◆ mCustomMargins

QMargins QtWaylandClient::QWaylandWindow::mCustomMargins
protected

Definition at line 334 of file qwaylandwindow_p.h.

Referenced by setCustomMargins(), and windowContentMargins().

◆ mDisplay

◆ mFlags

Qt::WindowFlags QtWaylandClient::QWaylandWindow::mFlags
protected

Definition at line 319 of file qwaylandwindow_p.h.

Referenced by createDecoration(), and setWindowFlags().

◆ mFractionalScale

QScopedPointer<QWaylandFractionalScale> QtWaylandClient::QWaylandWindow::mFractionalScale
protected

Definition at line 259 of file qwaylandwindow_p.h.

Referenced by reset().

◆ mFrameCallback

struct::wl_callback* QtWaylandClient::QWaylandWindow::mFrameCallback = nullptr
protected

Definition at line 296 of file qwaylandwindow_p.h.

Referenced by handleUpdate(), and reset().

◆ mFrameCallbackCheckIntervalTimerId

int QtWaylandClient::QWaylandWindow::mFrameCallbackCheckIntervalTimerId = -1
protected

Definition at line 291 of file qwaylandwindow_p.h.

Referenced by handleUpdate(), reset(), and timerEvent().

◆ mFrameCallbackElapsedTimer

QElapsedTimer QtWaylandClient::QWaylandWindow::mFrameCallbackElapsedTimer
protected

Definition at line 295 of file qwaylandwindow_p.h.

Referenced by handleUpdate(), reset(), and timerEvent().

◆ mFrameCallbackTimedOut

bool QtWaylandClient::QWaylandWindow::mFrameCallbackTimedOut = false
protected

◆ mFrameCallbackTimeout

int QtWaylandClient::QWaylandWindow::mFrameCallbackTimeout = 100
protected

Definition at line 308 of file qwaylandwindow_p.h.

Referenced by handleUpdate(), and timerEvent().

◆ mFrameSyncMutex

QMutex QtWaylandClient::QWaylandWindow::mFrameSyncMutex
protected

Definition at line 297 of file qwaylandwindow_p.h.

Referenced by handleUpdate(), requestUpdate(), reset(), timerEvent(), and waitForFrameSync().

◆ mFrameSyncWait

QWaitCondition QtWaylandClient::QWaylandWindow::mFrameSyncWait
protected

Definition at line 298 of file qwaylandwindow_p.h.

Referenced by waitForFrameSync().

◆ mGestureState

GestureState QtWaylandClient::QWaylandWindow::mGestureState = GestureNotActive
protected

Definition at line 286 of file qwaylandwindow_p.h.

Referenced by handlePinchGesture(), and handleSwipeGesture().

◆ mInputRegion

QRegion QtWaylandClient::QWaylandWindow::mInputRegion
protected

Definition at line 323 of file qwaylandwindow_p.h.

Referenced by reset().

◆ mLastReportedContentOrientation

Qt::ScreenOrientation QtWaylandClient::QWaylandWindow::mLastReportedContentOrientation = Qt::PrimaryOrientation
protected

Definition at line 339 of file qwaylandwindow_p.h.

Referenced by handleContentOrientationChange(), and updateBufferTransform().

◆ mLastReportedScreen

QPlatformScreen* QtWaylandClient::QWaylandWindow::mLastReportedScreen = nullptr
protected

Definition at line 314 of file qwaylandwindow_p.h.

◆ mLastReportedToplevelWindowTilingStates

ToplevelWindowTilingStates QtWaylandClient::QWaylandWindow::mLastReportedToplevelWindowTilingStates = WindowNoState
protected

◆ mLastReportedWindowStates

Qt::WindowStates QtWaylandClient::QWaylandWindow::mLastReportedWindowStates = Qt::WindowNoState
protected

Definition at line 327 of file qwaylandwindow_p.h.

Referenced by handleWindowStatesChanged(), and windowStates().

◆ mMask

QRegion QtWaylandClient::QWaylandWindow::mMask
protected

Definition at line 320 of file qwaylandwindow_p.h.

Referenced by reset(), setGeometry(), and setMask().

◆ mMouseEventsInContentArea

bool QtWaylandClient::QWaylandWindow::mMouseEventsInContentArea = false
protected

Definition at line 269 of file qwaylandwindow_p.h.

Referenced by handleMouse(), handlePinchGesture(), and handleSwipeGesture().

◆ mMousePressedInContentArea

Qt::MouseButtons QtWaylandClient::QWaylandWindow::mMousePressedInContentArea = Qt::NoButton
protected

Definition at line 270 of file qwaylandwindow_p.h.

◆ mOffset

QPoint QtWaylandClient::QWaylandWindow::mOffset
protected

◆ mOpaqueArea

QRegion QtWaylandClient::QWaylandWindow::mOpaqueArea
protected

Definition at line 326 of file qwaylandwindow_p.h.

Referenced by reset().

◆ mQueuedBuffer

QWaylandBuffer* QtWaylandClient::QWaylandWindow::mQueuedBuffer = nullptr
protected

Definition at line 331 of file qwaylandwindow_p.h.

Referenced by reset(), and safeCommit().

◆ mQueuedBufferDamage

QRegion QtWaylandClient::QWaylandWindow::mQueuedBufferDamage
protected

Definition at line 332 of file qwaylandwindow_p.h.

Referenced by reset(), and safeCommit().

◆ mResizeAfterSwap

bool QtWaylandClient::QWaylandWindow::mResizeAfterSwap
protected

Definition at line 307 of file qwaylandwindow_p.h.

Referenced by setGeometry().

◆ mResizeDirty

bool QtWaylandClient::QWaylandWindow::mResizeDirty = false
protected

Definition at line 306 of file qwaylandwindow_p.h.

Referenced by reset(), setCanResize(), and setGeometry().

◆ mResizeLock

QRecursiveMutex QtWaylandClient::QWaylandWindow::mResizeLock
protected

◆ mScale

qreal QtWaylandClient::QWaylandWindow::mScale = 1
protected

Definition at line 313 of file qwaylandwindow_p.h.

Referenced by devicePixelRatio().

◆ mSentInitialResize

bool QtWaylandClient::QWaylandWindow::mSentInitialResize = false
protected

Definition at line 311 of file qwaylandwindow_p.h.

Referenced by applyConfigure(), and setGeometry().

◆ mShellIntegration

QWaylandShellIntegration* QtWaylandClient::QWaylandWindow::mShellIntegration = nullptr
protected

Definition at line 262 of file qwaylandwindow_p.h.

Referenced by setShellIntegration().

◆ mShellSurface

◆ mSubSurfaceWindow

QWaylandSubSurface* QtWaylandClient::QWaylandWindow::mSubSurfaceWindow = nullptr
protected

◆ mSurface

◆ mSurfaceLock

◆ mTransientParent

QPointer<QWaylandWindow> QtWaylandClient::QWaylandWindow::mTransientParent
protected

Definition at line 336 of file qwaylandwindow_p.h.

Referenced by reset(), and transientParent().

◆ mTransparentInputRegion

bool QtWaylandClient::QWaylandWindow::mTransparentInputRegion = false
protected

Definition at line 324 of file qwaylandwindow_p.h.

Referenced by reset().

◆ mViewport

QScopedPointer<QWaylandViewport> QtWaylandClient::QWaylandWindow::mViewport
protected

Definition at line 260 of file qwaylandwindow_p.h.

Referenced by reset().

◆ mWaitingForFrameCallback

bool QtWaylandClient::QWaylandWindow::mWaitingForFrameCallback = false
protected

Definition at line 294 of file qwaylandwindow_p.h.

Referenced by handleUpdate(), requestUpdate(), reset(), and waitForFrameSync().

◆ mWaitingForUpdate

bool QtWaylandClient::QWaylandWindow::mWaitingForUpdate = false
protected

◆ mWaitingForUpdateDelivery

QAtomicInt QtWaylandClient::QWaylandWindow::mWaitingForUpdateDelivery = false
protected

Definition at line 292 of file qwaylandwindow_p.h.

Referenced by doHandleFrameCallback().

◆ mWaitingToApplyConfigure

bool QtWaylandClient::QWaylandWindow::mWaitingToApplyConfigure = false
protected

◆ mWindowDecoration

◆ mWindowDecorationEnabled

◆ mWindowIcon

QIcon QtWaylandClient::QWaylandWindow::mWindowIcon
protected

Definition at line 317 of file qwaylandwindow_p.h.

Referenced by setWindowIcon().

◆ mWindowId

WId QtWaylandClient::QWaylandWindow::mWindowId
protected

Definition at line 289 of file qwaylandwindow_p.h.

Referenced by winId().

◆ mWindowTitle

QString QtWaylandClient::QWaylandWindow::mWindowTitle
protected

Definition at line 316 of file qwaylandwindow_p.h.

Referenced by setWindowTitle(), and windowTitle().


The documentation for this class was generated from the following files: