diff options
author | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2010-02-15 13:06:32 (GMT) |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2010-03-02 10:33:16 (GMT) |
commit | 7366200d7600271c86144e70ae59ce77f39b2a16 (patch) | |
tree | 9460cd64d996dd03285e2ebcc14ed4f0ddcb802b /src/gui/kernel/qapplication_mac.mm | |
parent | 13f23b71cee682ccaaec455d72b1578afc2800ee (diff) | |
download | Qt-7366200d7600271c86144e70ae59ce77f39b2a16.zip Qt-7366200d7600271c86144e70ae59ce77f39b2a16.tar.gz Qt-7366200d7600271c86144e70ae59ce77f39b2a16.tar.bz2 |
Implement alien widgets on Mac/Cocoa.
This commit makes alien widgets opt in on a
per-widget basis on Mac, set the Qt::WA_NativeWindow
flag when creating the widget to enable. Setting
this flag on widgets that have native child or sibling
NSViews is not supported.
The main use case for alien widgets on Mac is to
improve performance for applications that have complex
user interfaces. Qt can handle thousands of widgets
per window, while Cocoa is designed to use a smaller
number of NSViews in combination with NSCells and
custom control implementations. This commit moves
us in the direction of having a few main NSViews with
"leaf" qwidgets implemented as a custom control.
Diffstat (limited to 'src/gui/kernel/qapplication_mac.mm')
-rw-r--r-- | src/gui/kernel/qapplication_mac.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index babfc72..c7d0e48 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -184,7 +184,8 @@ bool qt_mac_app_fullscreen = false; bool qt_scrollbar_jump_to_pos = false; static bool qt_mac_collapse_on_dblclick = true; extern int qt_antialiasing_threshold; // from qapplication.cpp -QPointer<QWidget> qt_button_down; // widget got last button-down +QWidget * qt_button_down; // widget got last button-down +QPointer<QWidget> qt_last_mouse_receiver; #ifndef QT_MAC_USE_COCOA static bool qt_button_down_in_content; // whether the button_down was in the content area. static bool qt_mac_previous_press_in_popup_mode = false; |