diff options
author | Giulio Camuffo <giulio.camuffo@kdab.com> | 2016-07-02 10:46:58 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2016-11-17 15:28:24 +0000 |
commit | 5b807802866c8df00cb3340d4f9bcc343be5973a (patch) | |
tree | 0fe08bebff92ebc5cf708ce97ede8a4e422399af /src/client/qwaylandxdgsurface_p.h | |
parent | 12f2e1e23fc1de16a42d3024561c0f839f9e96cd (diff) |
Create and destroy the shell surface when showing and hiding
This changes the shell surface handling for windows, and instead of
creating the shell surface at initialization time, and then attaching
a null buffer to hide it, it creates the shell surface on setVisible(true),
and destroys it on setVisible(false).
This fixes hiding when using xdg_shell, as that interface defines that
attaching a null buffer to an xdg_surface is an error.
Also this should help with bugged EGL drivers which attach a buffer
after eglSwapBuffers() returns, which used to cause a newly hidden
window to get a new valid buffer after we attached a null one, showing
it again.
Task-number: QTBUG-47902
Change-Id: I8e0a0442319a98cc1361803ea7be1d079b36fc8c
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/client/qwaylandxdgsurface_p.h')
-rw-r--r-- | src/client/qwaylandxdgsurface_p.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/qwaylandxdgsurface_p.h b/src/client/qwaylandxdgsurface_p.h index 1a5eeed7f..265d3ba80 100644 --- a/src/client/qwaylandxdgsurface_p.h +++ b/src/client/qwaylandxdgsurface_p.h @@ -99,14 +99,15 @@ public: bool isFullscreen() const { return m_fullscreen; } bool isMaximized() const { return m_maximized; } + void setType(Qt::WindowType type, QWaylandWindow *transientParent) override; + private: void setMaximized() Q_DECL_OVERRIDE; void setFullscreen() Q_DECL_OVERRIDE; void setNormal() Q_DECL_OVERRIDE; void setMinimized() Q_DECL_OVERRIDE; - void setTopLevel() Q_DECL_OVERRIDE; - void updateTransientParent(QWindow *parent) Q_DECL_OVERRIDE; + void updateTransientParent(QWaylandWindow *parent); private: QWaylandWindow *m_window; |