diff options
author | Paul Olav Tvete <paul.tvete@gmail.com> | 2015-05-04 17:48:18 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@gmail.com> | 2015-05-04 17:55:02 +0200 |
commit | c05a8757b095cb554ea3e50f202a0683ca7d5bf7 (patch) | |
tree | 0cc94f6907d57030e7db4e67e59781c269ce9906 /src/gui/kernel/qcursor.cpp | |
parent | 3110a6642cb9424069ad89666e3cca01d1d6b420 (diff) |
Multi-screen fixes
Various fixes, including:
* Resize backingstore properly if screen has changed
* Trigger resize event on screen change if necessary
* Fix yet another race condition in screen detection
* Trying to fix screen mapping
Not completely finished, but I think it's better to
keep in sync, and not diverge too much.
Diffstat (limited to 'src/gui/kernel/qcursor.cpp')
-rw-r--r-- | src/gui/kernel/qcursor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp index 92e591f8ac..236b3b0565 100644 --- a/src/gui/kernel/qcursor.cpp +++ b/src/gui/kernel/qcursor.cpp @@ -180,7 +180,7 @@ QPoint QCursor::pos(const QScreen *screen) { if (screen) if (const QPlatformCursor *cursor = screen->handle()->cursor()) - return QHighDpi::fromNativePixels(cursor->pos()); + return QHighDpi::fromNativePixels(cursor->pos(), screen); return QGuiApplicationPrivate::lastCursorPosition.toPoint(); } @@ -232,7 +232,7 @@ void QCursor::setPos(QScreen *screen, int x, int y) { if (screen) { if (QPlatformCursor *cursor = screen->handle()->cursor()) { - const QPoint devicePos = QHighDpi::toNativePixels(QPoint(x, y)); + const QPoint devicePos = QHighDpi::toNativePixels(QPoint(x, y), screen); // Need to check, since some X servers generate null mouse move // events, causing looping in applications which call setPos() on // every mouse move event. |