You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the mouse cursor is hidden when the user goes into the window title bar, the cursor is made visible. It is set to be re-hidden when the cursor goes back into the window client area. This behavior is from https://github.com/liballeg/allegro5/blob/master/src/win/wwindow.c (see all the usages of we_hid_the_mouse).
This presents a problem when the cursor should be made visible because of an action the application performs on ALLEGRO_EVENT_DISPLAY_CLOSE. This mouse state internal to wwindow.c has no idea the application has changed that the cursor should now be visible, so when the mouse re-enters the window client area it is incorrectly hidden.
I've provided an example program.
This program has been adapted from an allegro example. You can just copy over ex_mouse_cursor.cpp and build that target.
Include is some commented out code that provides a partial workaround. The cursor can still act funny when on the very edge of the display as it re-enters, but it at least is not hidden when it should be shown.
If the mouse cursor is hidden when the user goes into the window title bar, the cursor is made visible. It is set to be re-hidden when the cursor goes back into the window client area. This behavior is from https://github.com/liballeg/allegro5/blob/master/src/win/wwindow.c (see all the usages of
we_hid_the_mouse
).This presents a problem when the cursor should be made visible because of an action the application performs on
ALLEGRO_EVENT_DISPLAY_CLOSE
. This mouse state internal to wwindow.c has no idea the application has changed that the cursor should now be visible, so when the mouse re-enters the window client area it is incorrectly hidden.I've provided an example program.
This program has been adapted from an allegro example. You can just copy over
ex_mouse_cursor.cpp
and build that target.Include is some commented out code that provides a partial workaround. The cursor can still act funny when on the very edge of the display as it re-enters, but it at least is not hidden when it should be shown.
The text was updated successfully, but these errors were encountered: