Skip to content

Commit

Permalink
Trap mouse on mouseover if Lix window is active
Browse files Browse the repository at this point in the history
This reverts commit c33f2b6.

Problem with that c33f2b6: If you left by accident, then quickly
returned, you had to click inside Lix, thus sometimes cancelled the
replay unwanted if you chose the left mouse button.

Second problem: When you moved the mouse fast, possibly even within Lix,
the mouse got untrapped and you saw the OS cursor in addition to the Lix
cursor. It's possible that this fast mouse movement left Lix under the
hood, but it didn't feel like it.
  • Loading branch information
SimonN committed Jun 18, 2023
1 parent 9123d99 commit c52aede
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hardware/mouse.d
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ void consumeAllegroMouseEvents()
break;

case ALLEGRO_EVENT_MOUSE_ENTER_DISPLAY:
if (hardware.display.displayActive)
_trapMouse = true;
// Nepster 2016-06: When entering the display, the ingame
// cursor should jump to where we entered.
// This would sometimes trigger when the hardware mouse is close
Expand Down

0 comments on commit c52aede

Please sign in to comment.