summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-06-26 08:29:27 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-06-26 08:29:27 (GMT)
commite9e2baccfcfc48926414b0f18885140312470cae (patch)
tree289fd7825c7d4efc67fabfbee1a4b6d363c544b8 /src/gui/kernel
parent7484a16ffeaf2c7640fc35b424a66cdd8695841c (diff)
parent7278c142089d46946d1ad2558eae949220dfe0c4 (diff)
downloadQt-e9e2baccfcfc48926414b0f18885140312470cae.zip
Qt-e9e2baccfcfc48926414b0f18885140312470cae.tar.gz
Qt-e9e2baccfcfc48926414b0f18885140312470cae.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_win.cpp19
-rw-r--r--src/gui/kernel/qmime_mac.cpp7
2 files changed, 22 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 0daabde..bb7d931 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -752,7 +752,11 @@ void QApplicationPrivate::initializeWidgetPaletteHash()
typedef BOOL (WINAPI *PtrUpdateLayeredWindow)(HWND hwnd, HDC hdcDst, const POINT *pptDst,
const SIZE *psize, HDC hdcSrc, const POINT *pptSrc, COLORREF crKey,
const Q_BLENDFUNCTION *pblend, DWORD dwflags);
+
+typedef BOOL (WINAPI *PtrSetProcessDPIAware) (VOID);
+
static PtrUpdateLayeredWindow ptrUpdateLayeredWindow = 0;
+static PtrSetProcessDPIAware ptrSetProcessDPIAware = 0;
static BOOL WINAPI qt_updateLayeredWindowIndirect(HWND hwnd, const Q_UPDATELAYEREDWINDOWINFO *info)
{
@@ -878,6 +882,11 @@ void qt_init(QApplicationPrivate *priv, int)
if (ptrUpdateLayeredWindow && !ptrUpdateLayeredWindowIndirect)
ptrUpdateLayeredWindowIndirect = qt_updateLayeredWindowIndirect;
+
+ // Notify Vista and Windows 7 that we support highter DPI settings
+ if (ptrSetProcessDPIAware = (PtrSetProcessDPIAware)
+ QLibrary::resolve(QLatin1String("user32"), "SetProcessDPIAware"))
+ ptrSetProcessDPIAware();
#endif
}
@@ -1940,10 +1949,14 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
// don't show resize-cursors for fixed-size widgets
QRect fs = widget->frameStrut();
if (!widget->isMinimized()) {
+ if (widget->minimumHeight() == widget->maximumHeight()) {
+ if (pos.y() < -(fs.top() - fs.left()))
+ return HTCAPTION;
+ if (pos.y() >= widget->height())
+ return HTBORDER;
+ }
if (widget->minimumWidth() == widget->maximumWidth() && (pos.x() < 0 || pos.x() >= widget->width()))
- break;
- if (widget->minimumHeight() == widget->maximumHeight() && (pos.y() < -(fs.top() - fs.left()) || pos.y() >= widget->height()))
- break;
+ return HTBORDER;
}
}
diff --git a/src/gui/kernel/qmime_mac.cpp b/src/gui/kernel/qmime_mac.cpp
index 31c66e4..903b677 100644
--- a/src/gui/kernel/qmime_mac.cpp
+++ b/src/gui/kernel/qmime_mac.cpp
@@ -502,6 +502,8 @@ QList<QByteArray> QMacPasteboardMimeHTMLText::convertFromMime(const QString &mim
#ifdef Q_WS_MAC32
+// This can be removed once 10.6 is the minimum (or we have to require 64-bit) whichever comes first.
+
#include <QuickTime/QuickTime.h>
#include <qlibrary.h>
@@ -1099,7 +1101,10 @@ void QMacPasteboardMime::initialize()
//standard types that we wrap
new QMacPasteboardMimeTiff;
#ifdef Q_WS_MAC32
- new QMacPasteboardMimePict;
+ // 10.6 does automatic synthesis to and from PICT to standard image types (like TIFF),
+ // so don't bother doing it ourselves, especially since it's not available in 64-bit.
+ if (QSysInfo::MacintoshVersion < QSysInfo::MV_10_6)
+ new QMacPasteboardMimePict;
#endif
new QMacPasteboardMimeUnicodeText;
new QMacPasteboardMimePlainText;