From e05dc08ba02b4a9d893190230c8dfd2554ec4413 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Thu, 12 Jul 2018 13:01:14 +0200 Subject: winrt: Implement QPlatformCursor::setPos Additionally to setting the cursor position we have to make sure that enter and leave events are triggered. As WinRT at the moment only supports maximized/fullscreen native top level widgets, an enter or leave event has to be triggered, every time the cursor enters or leaves the core window. Same as is done on Windows desktop an enter event is immediately followed by a move event even for emulated mouse events. Change-Id: I4b9a7b07f8e24b7887619f96979a064d933788aa Reviewed-by: Maurice Kalinowski --- tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/auto/gui/kernel') diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index fd0a051390..7c24bbaadd 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -2104,8 +2104,6 @@ void tst_QWindow::modalWindowEnterEventOnHide_QTBUG35109() // Wait for the enter event. It must be delivered here, otherwise second // compare can PASS because of this event even after "resetCounters()". - if (isPlatformWinRT()) - QEXPECT_FAIL("", "WinRT does not support QCursor::setPos.", Abort); QTRY_COMPARE(root.enterEventCount, 1); QTRY_COMPARE(root.leaveEventCount, 0); @@ -2126,6 +2124,9 @@ void tst_QWindow::modalWindowEnterEventOnHide_QTBUG35109() root.resetCounters(); modal.close(); + if (isPlatformWinRT()) + QEXPECT_FAIL("", "WinRT does not trigger the enter event correctly" + "- QTBUG-68297.", Abort); // Check for the enter event QTRY_COMPARE(root.enterEventCount, 1); } -- cgit v1.2.3