mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 09:37:14 +02:00
Merge pull request #5098 from jherico/mac_cursor_fix
Fix doubled cursor on OSX
This commit is contained in:
commit
c36912ae27
1 changed files with 9 additions and 1 deletions
|
@ -524,8 +524,16 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
_window->setVisible(true);
|
_window->setVisible(true);
|
||||||
_glWidget->setFocusPolicy(Qt::StrongFocus);
|
_glWidget->setFocusPolicy(Qt::StrongFocus);
|
||||||
_glWidget->setFocus();
|
_glWidget->setFocus();
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
// OSX doesn't seem to provide for hiding the cursor only on the GL widget
|
||||||
|
_window->setCursor(Qt::BlankCursor);
|
||||||
|
#else
|
||||||
|
// On windows and linux, hiding the top level cursor also means it's invisible
|
||||||
|
// when hovering over the window menu, which is a pain, so only hide it for
|
||||||
|
// the GL surface
|
||||||
_glWidget->setCursor(Qt::BlankCursor);
|
_glWidget->setCursor(Qt::BlankCursor);
|
||||||
|
#endif
|
||||||
|
|
||||||
// enable mouse tracking; otherwise, we only get drag events
|
// enable mouse tracking; otherwise, we only get drag events
|
||||||
_glWidget->setMouseTracking(true);
|
_glWidget->setMouseTracking(true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue