mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-2460: Wrong position of input window and no input preview with fcitx and ubuntu 13.04.
This patch makes the fix of JBR-1573 (which caused JBR-4394) disabled by default, because it's incompatible with the native below-the-spot mode (a.k.a. over-the-spot in the X11's terminology).
(cherry picked from commit 3fe2a97aa0)
This commit is contained in:
committed by
jbrbot
parent
14c8c014eb
commit
2bd372f5d4
@@ -120,6 +120,19 @@ public class XInputMethod extends X11InputMethod {
|
||||
|
||||
protected boolean preferXBelowTheSpot() {
|
||||
try {
|
||||
if (BrokenImDetectionContext.EATEN_EVENTS_THRESHOLD > 0) {
|
||||
// The fix of JBR-1573,
|
||||
// which is incompatible with the implementation of the native below-the-spot mode (a.k.a. X over-the-spot),
|
||||
// is explicitly enabled.
|
||||
// So let's disable this mode in favor of that fix.
|
||||
|
||||
if (log.isLoggable(PlatformLogger.Level.WARNING)) {
|
||||
log.warning("The property \"jb.awt.newXimClient.preferBelowTheSpot\" is ignored in favor of the explicitly enabled \"recreate.x11.input.method\"");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
final String strVal = System.getProperty("jb.awt.newXimClient.preferBelowTheSpot");
|
||||
final boolean defVal = true;
|
||||
|
||||
@@ -297,12 +310,12 @@ public class XInputMethod extends X11InputMethod {
|
||||
|
||||
|
||||
static {
|
||||
int eatenEventsThresholdInitializer = 7;
|
||||
final String eventsThresholdMode = System.getProperty("recreate.x11.input.method", "true");
|
||||
int eatenEventsThresholdInitializer = 0;
|
||||
final String eventsThresholdMode = System.getProperty("recreate.x11.input.method", "false");
|
||||
|
||||
if ("false".equals(eventsThresholdMode)) {
|
||||
eatenEventsThresholdInitializer = 0;
|
||||
} else if (!"true".equals(eventsThresholdMode)) {
|
||||
if ("true".equalsIgnoreCase(eventsThresholdMode)) {
|
||||
eatenEventsThresholdInitializer = 7;
|
||||
} else if (!"false".equalsIgnoreCase(eventsThresholdMode)) {
|
||||
try {
|
||||
eatenEventsThresholdInitializer = Integer.parseInt(eventsThresholdMode);
|
||||
} catch (NumberFormatException err) {
|
||||
|
||||
Reference in New Issue
Block a user