summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandxdgshell_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor/extensions/qwaylandxdgshell_p.h')
-rw-r--r--src/compositor/extensions/qwaylandxdgshell_p.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshell_p.h b/src/compositor/extensions/qwaylandxdgshell_p.h
index 3165eb7ca..d7244c704 100644
--- a/src/compositor/extensions/qwaylandxdgshell_p.h
+++ b/src/compositor/extensions/qwaylandxdgshell_p.h
@@ -73,19 +73,19 @@ public:
bool isValidPopupParent(QWaylandSurface *parentSurface) const;
QWaylandXdgPopup *topmostPopupForClient(struct wl_client* client) const;
-private:
QSet<uint32_t> m_pings;
QMultiMap<struct wl_client *, QWaylandXdgSurface *> m_xdgSurfaces;
QMultiMap<struct wl_client *, QWaylandXdgPopup *> m_xdgPopups;
QWaylandXdgSurface *xdgSurfaceFromSurface(QWaylandSurface *surface);
+protected:
void xdg_shell_destroy(Resource *resource) Q_DECL_OVERRIDE;
void xdg_shell_get_xdg_surface(Resource *resource, uint32_t id,
struct ::wl_resource *surface) Q_DECL_OVERRIDE;
void xdg_shell_use_unstable_version(Resource *resource, int32_t version) Q_DECL_OVERRIDE;
void xdg_shell_get_xdg_popup(Resource *resource, uint32_t id, struct ::wl_resource *surface,
- struct ::wl_resource *parent, struct ::wl_resource *seat,
+ struct ::wl_resource *parent, struct ::wl_resource *seatResource,
uint32_t serial, int32_t x, int32_t y) Q_DECL_OVERRIDE;
void xdg_shell_pong(Resource *resource, uint32_t serial) Q_DECL_OVERRIDE;
};
@@ -99,6 +99,12 @@ public:
QWaylandXdgSurfacePrivate();
static QWaylandXdgSurfacePrivate *get(QWaylandXdgSurface *xdgSurface) { return xdgSurface->d_func(); }
+ enum WindowType {
+ UnknownWindowType,
+ TopLevelWindowType,
+ TransientWindowType
+ };
+
struct ConfigureEvent {
QVector<uint> states;
QSize size;
@@ -107,12 +113,16 @@ public:
void handleFocusLost();
void handleFocusReceived();
+ QRect calculateFallbackWindowGeometry() const;
+ void updateFallbackWindowGeometry();
private:
QWaylandXdgShell *m_xdgShell;
QWaylandSurface *m_surface;
QWaylandXdgSurface *m_parentSurface;
+ WindowType m_windowType;
+
QString m_title;
QString m_appId;
QRect m_windowGeometry;
@@ -137,7 +147,7 @@ private:
void xdg_surface_set_minimized(Resource *resource) Q_DECL_OVERRIDE;
void xdg_surface_set_parent(Resource *resource, struct ::wl_resource *parent) Q_DECL_OVERRIDE;
void xdg_surface_set_app_id(Resource *resource, const QString &app_id) Q_DECL_OVERRIDE;
- void xdg_surface_show_window_menu(Resource *resource, struct ::wl_resource *seat,
+ void xdg_surface_show_window_menu(Resource *resource, struct ::wl_resource *seatResource,
uint32_t serial, int32_t x, int32_t y) Q_DECL_OVERRIDE;
void xdg_surface_ack_configure(Resource *resource, uint32_t serial) Q_DECL_OVERRIDE;
void xdg_surface_set_title(Resource *resource, const QString &title) Q_DECL_OVERRIDE;
@@ -157,10 +167,10 @@ public:
QWaylandXdgPopupPrivate();
static QWaylandXdgPopupPrivate *get(QWaylandXdgPopup *xdgPopup) { return xdgPopup->d_func(); }
-private:
QWaylandSurface *m_surface;
QWaylandSurface *m_parentSurface;
QWaylandXdgShell *m_xdgShell;
+ QPoint m_position;
void xdg_popup_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
void xdg_popup_destroy(xdg_popup::Resource *resource) Q_DECL_OVERRIDE;