From 2cdc04006647d6ad6a7d1d58e2047996994d09dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sat, 19 Mar 2016 00:41:01 +0000 Subject: [PATCH] [GB.QT5] * BUG: Remove Mouse.ScreenX and Mouse.ScreenY optimization based on the contents of a mouse event. Apparently it works with QT4 but not with QT5. git-svn-id: svn://localhost/gambas/trunk@7643 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.qt4/src/CMouse.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gb.qt4/src/CMouse.cpp b/gb.qt4/src/CMouse.cpp index df7c2f8fb..ca97b2d38 100644 --- a/gb.qt4/src/CMouse.cpp +++ b/gb.qt4/src/CMouse.cpp @@ -182,14 +182,22 @@ END_PROPERTY BEGIN_PROPERTY(Mouse_ScreenX) +#ifdef QT5 + GB.ReturnInteger(QCursor::pos().x()); +#else GB.ReturnInteger(MOUSE_info.valid ? MOUSE_info.screenX : QCursor::pos().x()); +#endif END_PROPERTY BEGIN_PROPERTY(Mouse_ScreenY) +#ifdef QT5 + GB.ReturnInteger(QCursor::pos().y()); +#else GB.ReturnInteger(MOUSE_info.valid ? MOUSE_info.screenY : QCursor::pos().y()); +#endif END_PROPERTY