Skip to content

Instantly share code, notes, and snippets.

@Zeno-
Created March 9, 2015 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zeno-/1f17444cd99a0a769ee6 to your computer and use it in GitHub Desktop.
Save Zeno-/1f17444cd99a0a769ee6 to your computer and use it in GitHub Desktop.
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index 300eaf8..49022fe 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -2936,6 +2936,16 @@ bool GUIFormSpecMenu::preprocessEvent(const SEvent& event)
/******************************************************************************/
bool GUIFormSpecMenu::DoubleClickDetection(const SEvent event)
{
+ /* The following code is for capturing double-clicks of the mouse button
+ * that are *not* in/in a control (i.e. when the mouse if positioned in an
+ * unused area of the formspec) and translating the double-click into an
+ * EET_KEY_INPUT_EVENT even which closes the form.
+ *
+ * There have been many github issues reporting this as a bug even though it
+ * was an intended feature. For this reason the code has been disabled for
+ * non-Android builds
+ */
+#ifdef __ANDROID__
if (event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN) {
m_doubleclickdetect[0].pos = m_doubleclickdetect[1].pos;
m_doubleclickdetect[0].time = m_doubleclickdetect[1].time;
@@ -2973,7 +2983,8 @@ bool GUIFormSpecMenu::DoubleClickDetection(const SEvent event)
// and no one else did notice this event
delete translated;
return true;
- }
+ }
+#endif
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment