import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.HashMap;
import com.intellij.util.io.storage.HeavyProcessLatch;
-import com.intellij.util.ui.MouseEventAdapter;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
return myCurrentEvent;
}
- private static class InertialMouseRouter {
- private static final int MOUSE_WHEEL_RESTART_THRESHOLD = 50;
- private static Component wheelDestinationComponent;
- private static long lastMouseWheel;
-
- @NotNull
- private static AWTEvent changeSourceIfNeeded(@NotNull AWTEvent awtEvent) {
- if (SystemInfo.isMac && Registry.is("ide.inertial.mouse.fix") && awtEvent instanceof MouseWheelEvent) {
- MouseWheelEvent mwe = (MouseWheelEvent) awtEvent;
- if (mwe.getWhen() - lastMouseWheel > MOUSE_WHEEL_RESTART_THRESHOLD) {
- wheelDestinationComponent = SwingUtilities.getDeepestComponentAt(mwe.getComponent(), mwe.getX(), mwe.getY());
- }
- lastMouseWheel = System.currentTimeMillis();
-
- int modifiers = mwe.getModifiers() | mwe.getModifiersEx();
- return MouseEventAdapter.convert(mwe, wheelDestinationComponent, mwe.getID(), lastMouseWheel, modifiers, mwe.getX(), mwe.getY());
- }
- return awtEvent;
- }
- }
-
private static boolean ourAppIsLoaded;
private static boolean appIsLoaded() {
return;
}
- e = InertialMouseRouter.changeSourceIfNeeded(e);
-
e = fixNonEnglishKeyboardLayouts(e);
e = mapEvent(e);
suppress.focus.stealing=false
suppress.focus.stealing.description=(Experimental) Trying to fight focus stealing
-ide.inertial.mouse.fix=false
-ide.inertial.mouse.fix.description=See IDEA-71508
-
ide.mouse.popup.trigger.modifiers.disabled=true
ide.mouse.popup.trigger.modifiers.disabled.description=Do not show a context popup if right button is pressed with modifiers