summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/qfocusevent
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2014-01-28 15:19:01 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-05 23:12:50 +0100
commitb1714aec5103ddd24e4f1cf14138746a3526ae95 (patch)
tree63307d9f9d54ee77d5b78fe98553f5155d5fe785 /tests/auto/other/qfocusevent
parent23401a1462ffd601172d17365ff07118f198c438 (diff)
Cocoa: Allow frameless NSWindow child QWindows
Showing, moving and resizing Contrarily to what an NSWindow does to its NSViews, child NSWindows need to be explicitly shown and hidden, and clipped if the parent NSWindow changes geometry. Also, hiding an NSWindow will not hide its child windows. This needed to be managed manually, adding 2 additional states to QCocoaWindow to reflect whether a child window has been clipped out by any ancestor geometry change, or hidden by any ancestor being hid. Also, ordering out an NSWindow will remove it fromm its parent's child windows array, making necessary to maintain a parallel list of child windows in QCocoaWindow. Stack order Although child NSWindows can be ordered relatively to each other, they need to be added again to be moved lower in the window stack. This also means the windows above it need to be added on top. Key (focus) status One of the remaining issues, is to make sure the top level window keeps the "key status" while still forwarding key events to the child window. Keeping same event propagation This use case is best illustrated with undocking QDockWidgets (if these are child NSWindows). The main issue is to make sure the QDockArea will get the mouse events right after undocking a dock widget. We used a similar workaround as the "key status" problem, and manually forward the mouse events to the dock area's QWindow. Manual test, by Morten Johan Sørvig, included. Task-number: QTBUG-33082 Task-number: QTBUG-22815 Change-Id: I50e34936fb82bff013e99f4bcb3bd0db0704c6ae Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'tests/auto/other/qfocusevent')
-rw-r--r--tests/auto/other/qfocusevent/tst_qfocusevent.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
index df26407fe6..33deed9737 100644
--- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
+++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
@@ -372,9 +372,6 @@ void tst_QFocusEvent::checkReason_ActiveWindow()
#if defined(Q_OS_IRIX)
QEXPECT_FAIL("", "IRIX requires explicit activateWindow(), so this test does not make any sense.", Abort);
#endif
-#ifdef Q_OS_MAC
- QEXPECT_FAIL("", "QTBUG-22815", Abort);
-#endif
QTRY_VERIFY(childFocusWidgetOne->focusInEventRecieved);
QVERIFY(childFocusWidgetOne->focusInEventGotFocus);