mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
[editor] IJPL-233066 disable smooth caret blinking in RDP sessions
(cherry picked from commit 807ea3b9101170427d36a19d1c9fa1b7b9c3b79e) IJ-CR-192627 GitOrigin-RevId: f85872c18b956f3c50e545e7089203ea5deaed76
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6ee12975e6
commit
53e532e52b
+6
-3
@@ -73,11 +73,14 @@ internal class EditorCaretRepaintService(coroutineScope: CoroutineScope) {
|
||||
check(actionRequests.tryEmit(Unit))
|
||||
}
|
||||
|
||||
private fun shouldUseNormalBlinking(editor: EditorImpl) =
|
||||
editor.shouldDisableAnimations() || !editor.settings.isSmoothCaretBlinking
|
||||
|
||||
private suspend fun blink(editor: EditorImpl) {
|
||||
if (editor.settings.isSmoothCaretBlinking) {
|
||||
blinkSmooth(editor)
|
||||
} else {
|
||||
if (shouldUseNormalBlinking(editor)) {
|
||||
blinkNormal(editor)
|
||||
} else {
|
||||
blinkSmooth(editor)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3355,13 +3355,17 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
}
|
||||
}
|
||||
|
||||
boolean shouldDisableAnimations() {
|
||||
return Registry.is("ui.simplified", false) ||
|
||||
PowerSaveMode.isEnabled() ||
|
||||
RemoteDesktopService.isRemoteSession();
|
||||
}
|
||||
|
||||
private boolean shouldSetCursorPositionImmediately() {
|
||||
return !getSettings().isAnimatedCaret() ||
|
||||
gainedFocus.getAndSet(false) ||
|
||||
myMouseIsInDrag ||
|
||||
Registry.is("ui.simplified", false) ||
|
||||
PowerSaveMode.isEnabled() ||
|
||||
RemoteDesktopService.isRemoteSession();
|
||||
shouldDisableAnimations();
|
||||
}
|
||||
|
||||
private void setCursorPosition() {
|
||||
|
||||
Reference in New Issue
Block a user