Skip to content

Commit 863ece6

Browse files
author
Fraser J. Gordon
committed
[[ Bugfix 13278 ]] Fix a button mouse focus issue
1 parent 6e29609 commit 863ece6

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

docs/notes/bugfix-13278.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Fix a button focus issue
2+

engine/src/button.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,12 @@ Boolean MCButton::mup(uint2 which, bool p_release)
15111511
// MW-2011-08-18: [[ Layers ]] Invalidate the whole object.
15121512
layer_redrawall();
15131513
}
1514+
1515+
// FG-2014-09-16: [[ Bugfix 13278 ]] Clear the mouse focus if this is not
1516+
// an auto-arming button (e.g. a button within a menu).
1517+
if (!(flags & F_AUTO_ARM))
1518+
state &= ~CS_MFOCUSED;
1519+
15141520
return True;
15151521
}
15161522

0 commit comments

Comments
 (0)