summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-08-02 15:41:52 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-08-14 08:16:22 +0000
commit4d0ae358dd646c369829bb38c099eb47bd04db4a (patch)
tree0b6e9c283301c5f1444b2b4ce48d1eaa26623965 /src/client
parent0d568553ee849f9273bbd3675f4ceae200b3acd9 (diff)
Client: Implement xdg-decoration-unstable-v1 for SSD support
[ChangeLog][QPA plugin] Added client-side support for the xdg-decoration-unstable-v1 Wayland extension. Qt clients will now let the compositor draw the window decorations if configured through this extension. Note: The env var QT_WAYLAND_DISABLE_WINDOWDECORATION is still supported, but works on a higher level, and for all shell integrations, while xdg-decoration only works with xdg-shell stable. Task-number: QTBUG-69746 Change-Id: I9dd0331bbd8d624c6be54ed23ee3b96446d5820d Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'src/client')
-rw-r--r--src/client/qwaylanddisplay.cpp7
-rw-r--r--src/client/qwaylanddisplay_p.h1
-rw-r--r--src/client/qwaylandintegration_p.h3
3 files changed, 10 insertions, 1 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 40ceafd96..5e67cd3a6 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -326,6 +326,13 @@ void QWaylandDisplay::addRegistryListener(RegistryListener listener, void *data)
(*l.listener)(l.data, mGlobals[i].registry, mGlobals[i].id, mGlobals[i].interface, mGlobals[i].version);
}
+void QWaylandDisplay::removeListener(RegistryListener listener, void *data)
+{
+ std::remove_if(mRegistryListeners.begin(), mRegistryListeners.end(), [=](Listener l){
+ return (l.listener == listener && l.data == data);
+ });
+}
+
uint32_t QWaylandDisplay::currentTimeMillisec()
{
//### we throw away the time information
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h
index aee1ed45f..8839bbe4c 100644
--- a/src/client/qwaylanddisplay_p.h
+++ b/src/client/qwaylanddisplay_p.h
@@ -161,6 +161,7 @@ public:
/* wl_registry_add_listener does not add but rather sets a listener, so this function is used
* to enable many listeners at once. */
void addRegistryListener(RegistryListener listener, void *data);
+ void removeListener(RegistryListener listener, void *data);
QWaylandShm *shm() const { return mShm.data(); }
diff --git a/src/client/qwaylandintegration_p.h b/src/client/qwaylandintegration_p.h
index 8c34e7198..a5a3d7b69 100644
--- a/src/client/qwaylandintegration_p.h
+++ b/src/client/qwaylandintegration_p.h
@@ -117,7 +117,8 @@ public:
virtual QWaylandShellIntegration *shellIntegration() const;
private:
- // NOTE: mDisplay *must* be destructed after mDrag and mClientBufferIntegration.
+ // NOTE: mDisplay *must* be destructed after mDrag and mClientBufferIntegration
+ // and mShellIntegration.
// Do not move this definition into the private section at the bottom.
QScopedPointer<QWaylandDisplay> mDisplay;