summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2012-10-01 19:26:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-08 08:49:00 +0200
commitd0573aa914e59c2947fabb6960735981286cf772 (patch)
tree4a185655994b6d718dcc3216e571f8de645ca8c1 /src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
parent274c25852179d032efb5afe6a4a268c7fafc9e8c (diff)
osx: support for QScreen changes at runtime, and physical dimensions
QScreen's physical size and logical DPI come from the operating system. Physical DPI is calculated as pixel size / physical size. Whenever the user changes the display settings, applicationDidChangeScreenParameters is called; QScreens are created and destroyed when displays are added and removed, and each QScreen which continues to exist gets updated properties from the OS. Change-Id: I7f2e9e32a3ad53d73ea987f39a0c62fa8dd22b05 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index 4dc310a889..3023100d93 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -77,6 +77,7 @@
#import "qcocoaapplicationdelegate.h"
#import "qnswindowdelegate.h"
#import "qcocoamenuloader.h"
+#include "qcocoaintegration.h"
#include <qevent.h>
#include <qurl.h>
#include <qdebug.h>
@@ -346,7 +347,7 @@ static void cleanupCocoaApplicationDelegate()
- (void)applicationDidChangeScreenParameters:(NSNotification *)notification
{
Q_UNUSED(notification);
- //QDesktopWidgetImplementation::instance()->onResize();
+ ((QCocoaIntegration*)QGuiApplicationPrivate::platformIntegration())->updateScreens();
}
- (void)setReflectionDelegate:(NSObject <NSApplicationDelegate> *)oldDelegate