diff options
author | Craig Robbins <kde.psych@gmail.com> | 2015-03-09 12:42:25 +1000 |
---|---|---|
committer | Craig Robbins <kde.psych@gmail.com> | 2015-03-09 12:42:25 +1000 |
commit | e74b8da54e4443773404f2642916fd2f2b7f625e (patch) | |
tree | e476fce8119e495be6c01f190a8fb0c1d39f1176 /src | |
parent | 3ae16f1c17c2b23c143b5a4ee6191f37d5371633 (diff) | |
download | minetest-e74b8da54e4443773404f2642916fd2f2b7f625e.tar.gz minetest-e74b8da54e4443773404f2642916fd2f2b7f625e.tar.bz2 minetest-e74b8da54e4443773404f2642916fd2f2b7f625e.zip |
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)
Diffstat (limited to 'src')
-rw-r--r-- | src/guiFormSpecMenu.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index 300eaf80c..265d6c72d 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 event 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; @@ -2974,6 +2984,7 @@ bool GUIFormSpecMenu::DoubleClickDetection(const SEvent event) delete translated; return true; } +#endif return false; } |