diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-04-10 11:21:32 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-04-17 08:20:26 +0200 |
commit | 6f43902b12dd36fa2b69401065df198ef9ffdb09 (patch) | |
tree | ceec26c88e04371cf7acff07fbf023afb1bba3c0 /sw | |
parent | c650217cc543080928a26de4bfc07ebb0be5c6ca (diff) |
tdf#122920 Send UNO mouse events to parent window listeners as well
When user registers a mouse listener to a window, he expects
to receive mouse events when a user clicks in somewhere in that
window, even if it's technically a widget inside that window
Change-Id: Ie6d3f8b140e4a5b516051014282b43775ecec59e
Reviewed-on: https://gerrit.libreoffice.org/70512
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/uitest/writer_tests5/xwindow.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/qa/uitest/writer_tests5/xwindow.py b/sw/qa/uitest/writer_tests5/xwindow.py index 81104bb7a3ef..0ed53f49c9c7 100644 --- a/sw/qa/uitest/writer_tests5/xwindow.py +++ b/sw/qa/uitest/writer_tests5/xwindow.py @@ -43,15 +43,13 @@ class XMouseListenerExtended(unohelper.Base, XMouseListener): # is invoked when the mouse enters a window. @classmethod def mouseEntered(self, xMouseEvent): - global mouseEventsIntercepted - mouseEventsIntercepted += 1 + # doesn't work in UI tests return super(XMouseListenerExtended, self).mouseEntered(xMouseEvent) # is invoked when the mouse exits a window. @classmethod def mouseExited(self, xMouseEvent): - global mouseEventsIntercepted - mouseEventsIntercepted += 1 + # doesn't work in UI tests return super(XMouseListenerExtended, self).mouseExited(xMouseEvent) @@ -142,8 +140,8 @@ class XWindow(UITestCase): self.assertEqual(0, keymouseEventsIntercepted) global mouseEventsIntercepted - # Not expected 3 interceptions - self.assertEqual(0, mouseEventsIntercepted) + # mousePressed, mouseReleased and mouseEntered should be triggered + self.assertEqual(2, mouseEventsIntercepted) # close document self.ui_test.close_doc() |