Skip to content

Commit

Permalink
Improve mouse cursor hiding consistency when the pointer is captured.
Browse files Browse the repository at this point in the history
This fixes issues under Wayland when dragging the 2D and 3D views.
  • Loading branch information
jonri committed Mar 22, 2024
1 parent 9a9c014 commit ee57da9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/wxutil/FreezePointer.cpp
Expand Up @@ -28,7 +28,7 @@ void FreezePointer::startCapture(wxWindow* window,

if (_hidePointer)
{
topLevel->SetCursor(wxCursor(wxCURSOR_BLANK));
window->SetCursor(wxCursor(wxCURSOR_BLANK));
}

// We capture the mouse on the toplevel app, coordinates
Expand Down Expand Up @@ -92,7 +92,7 @@ void FreezePointer::endCapture()

if (_hidePointer)
{
topLevel->SetCursor(wxCursor(wxCURSOR_DEFAULT));
window->SetCursor(wxCursor(wxCURSOR_DEFAULT));
}

if (topLevel->HasCapture())
Expand Down
3 changes: 3 additions & 0 deletions radiant/xyview/OrthoView.cpp
Expand Up @@ -423,6 +423,9 @@ bool OrthoView::checkChaseMouse(unsigned int state)

void OrthoView::setCursorType(CursorType type)
{
if (_freezePointer.isCapturing(_wxGLWidget))
return;

switch (type)
{
case CursorType::Pointer:
Expand Down

0 comments on commit ee57da9

Please sign in to comment.