Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 76177c8

Browse files
committedMar 9, 2015
Stop formspecs closing with double-click in empty area
Behaviour on Android remains the same until other alternatives can be devised (if possible) See #2425 (and the many other -- now closed -- issues reporting this feature as a bug)
1 parent 3ae16f1 commit 76177c8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
 

Diff for: ‎src/guiFormSpecMenu.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -2936,6 +2936,16 @@ bool GUIFormSpecMenu::preprocessEvent(const SEvent& event)
29362936
/******************************************************************************/
29372937
bool GUIFormSpecMenu::DoubleClickDetection(const SEvent event)
29382938
{
2939+
/* The following code is for capturing double-clicks of the mouse button
2940+
* that are *not* in/in a control (i.e. when the mouse if positioned in an
2941+
* unused area of the formspec) and translating the double-click into an
2942+
* EET_KEY_INPUT_EVENT even which closes the form.
2943+
*
2944+
* There have been many github issues reporting this as a bug even though it
2945+
* was an intended feature. For this reason the code has been disabled for
2946+
* non-Android builds
2947+
*/
2948+
#ifdef __ANDROID__
29392949
if (event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN) {
29402950
m_doubleclickdetect[0].pos = m_doubleclickdetect[1].pos;
29412951
m_doubleclickdetect[0].time = m_doubleclickdetect[1].time;
@@ -2974,6 +2984,7 @@ bool GUIFormSpecMenu::DoubleClickDetection(const SEvent event)
29742984
delete translated;
29752985
return true;
29762986
}
2987+
#endif
29772988
return false;
29782989
}
29792990

0 commit comments

Comments
 (0)
Please sign in to comment.