summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_mac.mm
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-03-30 13:55:07 (GMT)
committerNorwegian Rock Cat <qt-info@nokia.com>2009-03-30 15:12:24 (GMT)
commitae1606b18c099b743e3cb410395b35ee290ae335 (patch)
tree0000ac65bd03fe3200f4596c480bae9e5fe374b5 /src/gui/kernel/qwidget_mac.mm
parent42fd9d5b21e41bdc1fc0ffb788fe96018c311d64 (diff)
downloadQt-ae1606b18c099b743e3cb410395b35ee290ae335.zip
Qt-ae1606b18c099b743e3cb410395b35ee290ae335.tar.gz
Qt-ae1606b18c099b743e3cb410395b35ee290ae335.tar.bz2
Call documented API.
We were using the older CGSSetWindowAlpha function, which really is not well advertised. Instead, Apple eventually added SetWindowAlpha, but we neglected to update. May as well do that now skip the wrath of a change in the private API. Task-number: 244629
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r--src/gui/kernel/qwidget_mac.mm13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 7a586e1..cd11b52 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -4450,14 +4450,6 @@ void QWidgetPrivate::setMask_sys(const QRegion &region)
#endif
}
-extern "C" {
- typedef struct CGSConnection *CGSConnectionRef;
- typedef struct CGSWindow *CGSWindowRef;
- extern OSStatus CGSSetWindowAlpha(CGSConnectionRef, CGSWindowRef, float);
- extern CGSWindowRef GetNativeWindowFromWindowRef(WindowRef);
- extern CGSConnectionRef _CGSDefaultConnection();
-}
-
void QWidgetPrivate::setWindowOpacity_sys(qreal level)
{
Q_Q(QWidget);
@@ -4470,12 +4462,11 @@ void QWidgetPrivate::setWindowOpacity_sys(qreal level)
if (!q->testAttribute(Qt::WA_WState_Created))
return;
-#if QT_MAC_USE_COCOA
OSWindowRef oswindow = qt_mac_window_for(q);
+#if QT_MAC_USE_COCOA
[oswindow setAlphaValue:level];
#else
- CGSSetWindowAlpha(_CGSDefaultConnection(),
- GetNativeWindowFromWindowRef(qt_mac_window_for(q)), level);
+ SetWindowAlpha(oswindow, level);
#endif
}