mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 20:15:22 +02:00
RESOLVED - bug 240098: [terminal] The cursor should not blink when the terminal is disconnected
https://bugs.eclipse.org/bugs/show_bug.cgi?id=240098 use async exec
This commit is contained in:
parent
2b3fd9cab7
commit
9aa73afcd1
1 changed files with 3 additions and 3 deletions
|
@ -953,7 +953,7 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC
|
|||
fState=state;
|
||||
fTerminalListener.setState(state);
|
||||
// enable the (blinking) cursor if the terminal is connected
|
||||
runInDisplayThread(new Runnable() {
|
||||
runAsyncInDisplayThread(new Runnable() {
|
||||
public void run() {
|
||||
if(fCtlText!=null && !fCtlText.isDisposed())
|
||||
fCtlText.setCursorEnabled(isConnected());
|
||||
|
@ -962,11 +962,11 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC
|
|||
/**
|
||||
* @param runnable run in display thread
|
||||
*/
|
||||
private void runInDisplayThread(Runnable runnable) {
|
||||
private void runAsyncInDisplayThread(Runnable runnable) {
|
||||
if(Display.findDisplay(Thread.currentThread())!=null)
|
||||
runnable.run();
|
||||
else if(PlatformUI.isWorkbenchRunning())
|
||||
PlatformUI.getWorkbench().getDisplay().syncExec(runnable);
|
||||
PlatformUI.getWorkbench().getDisplay().asyncExec(runnable);
|
||||
// else should not happen and we ignore it...
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue