summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoabackingstore.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-08-06 16:57:44 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-08-07 12:01:22 +0200
commitb4f6fdf57574cfb0c8ab7e7b80f8e4b01f13c0dd (patch)
tree489ce6a297d7a51f5c6c2fb3a3560be7cf8266ae /src/plugins/platforms/cocoa/qcocoabackingstore.h
parentabb985a4032a337581aa885e1ac547287244b695 (diff)
macOS: Handle platform window destroy and create in backingstore
We observe changes to the NSWindow to pick up color space changes, so we need to track when the platform window is destroyed and created to match our observer with the recreated NSWindow. This does not handle the fact that we're internally recreating the NSWindow if certain window flag changes requires so, without letting clients know via surface events. Task-number: QTBUG-85915 Pick-to: 5.15 Change-Id: I7a7d728c742def79adebaadc985cedd86ea0d581 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoabackingstore.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoabackingstore.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.h b/src/plugins/platforms/cocoa/qcocoabackingstore.h
index c29ab2d8f8..4a5b3886f2 100644
--- a/src/plugins/platforms/cocoa/qcocoabackingstore.h
+++ b/src/plugins/platforms/cocoa/qcocoabackingstore.h
@@ -96,6 +96,9 @@ public:
QPlatformGraphicsBuffer *graphicsBuffer() const override;
private:
+ void observeBackingPropertiesChanges();
+ bool eventFilter(QObject *watched, QEvent *event) override;
+
QSize m_requestedSize;
QRegion m_paintedRegion;