return;
}
- /* Set an appropriate theme. */
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
- setTheme (android.R.style.Theme_DeviceDefault);
-
/* Now see if the action specified is supported by Emacs. */
if (action.equals ("android.intent.action.VIEW")
<resources>
<!-- Style used for popup menus and relatives on Android 3.x. -->
<style name="EmacsStyle" parent="@android:style/Theme.Holo.NoActionBar"/>
+ <style name="EmacsStyleOpen" parent="@android:style/Theme.Holo"/>
</resources>
<!-- Style used for popup menus and relatives between Android 4.0
and Android 10. -->
<style name="EmacsStyle" parent="@android:style/Theme.DeviceDefault.NoActionBar"/>
+ <style name="EmacsStyleOpen" parent="@android:style/Theme.DeviceDefault"/>
</resources>
<!-- Required to make sure the status bar text remains legible. -->
<item name="android:statusBarColor">@android:color/black</item>
</style>
+ <style name="EmacsStyleOpen"
+ parent="@android:style/Theme.DeviceDefault.DayNight"/>
</resources>
2.3. Styles used for newer Android versions are defined in
the res/values- directories for their respective API levels. -->
<style name="EmacsStyle" parent="@android:style/Theme.NoTitleBar"/>
+ <style name="EmacsStyleOpen" parent="@android:style/Theme"/>
</resources>
effect, turn it off after the first character read. This
makes input methods send actual key events instead.
- Make sure only to do this once. */
+ Make sure only to do this once. Also, disabling text
+ conversion seems to interact badly with menus, so don't
+ disable text conversion if a menu was displayed. */
- if (!disabled_conversion && t)
+ if (!disabled_conversion && t && !used_mouse_menu)
{
- disable_text_conversion ();
- record_unwind_protect_void (resume_text_conversion);
+ int i;
+
+ /* used_mouse_menu isn't set if a menu bar prefix key has
+ just been stored. It appears necessary to look for the
+ prefix key itself. */
+
+ for (i = 0; i < t; ++i)
+ {
+ if (EQ (keybuf[i], Qmenu_bar))
+ break;
+ }
- disabled_conversion = true;
+ if (i == t)
+ {
+ disable_text_conversion ();
+ record_unwind_protect_void (resume_text_conversion);
+ disabled_conversion = true;
+ }
}
#endif