summaryrefslogtreecommitdiff
path: root/java/org/gnu/emacs/EmacsWindow.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/org/gnu/emacs/EmacsWindow.java')
-rw-r--r--java/org/gnu/emacs/EmacsWindow.java24
1 files changed, 10 insertions, 14 deletions
diff --git a/java/org/gnu/emacs/EmacsWindow.java b/java/org/gnu/emacs/EmacsWindow.java
index 68a18ec2aa7..739a1f43b7d 100644
--- a/java/org/gnu/emacs/EmacsWindow.java
+++ b/java/org/gnu/emacs/EmacsWindow.java
@@ -103,11 +103,10 @@ public final class EmacsWindow extends EmacsHandleObject
public int lastButtonState, lastModifiers;
/* Whether or not the window is mapped. */
- private boolean isMapped;
+ private volatile boolean isMapped;
- /* Whether or not to ask for focus upon being mapped, and whether or
- not the window should be focusable. */
- private boolean dontFocusOnMap, dontAcceptFocus;
+ /* Whether or not to ask for focus upon being mapped. */
+ private boolean dontFocusOnMap;
/* Whether or not the window is override-redirect. An
override-redirect window always has its own system window. */
@@ -464,7 +463,7 @@ public final class EmacsWindow extends EmacsHandleObject
}
}
- public void
+ public synchronized void
unmapWindow ()
{
if (!isMapped)
@@ -618,7 +617,7 @@ public final class EmacsWindow extends EmacsHandleObject
onKeyUp (int keyCode, KeyEvent event)
{
int state, state_1;
- long time, serial;
+ long time;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2)
state = event.getModifiers ();
@@ -645,12 +644,11 @@ public final class EmacsWindow extends EmacsHandleObject
state_1
= state & ~(KeyEvent.META_ALT_MASK | KeyEvent.META_CTRL_MASK);
- serial
- = EmacsNative.sendKeyRelease (this.handle,
- event.getEventTime (),
- state, keyCode,
- getEventUnicodeChar (event,
- state_1));
+ EmacsNative.sendKeyRelease (this.handle,
+ event.getEventTime (),
+ state, keyCode,
+ getEventUnicodeChar (event,
+ state_1));
lastModifiers = state;
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN)
@@ -1155,8 +1153,6 @@ public final class EmacsWindow extends EmacsHandleObject
public synchronized void
setDontAcceptFocus (final boolean dontAcceptFocus)
{
- this.dontAcceptFocus = dontAcceptFocus;
-
/* Update the view's focus state. */
EmacsService.SERVICE.runOnUiThread (new Runnable () {
@Override