File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,6 @@ const DEVEL_COMMANDS = { 'lg': x => Main.createLookingGlass().open(),
47
47
'debugexit' : x => Meta . quit ( Meta . ExitCode . ERROR ) ,
48
48
'rt' : x => Main . themeManager . _changeTheme ( ) } ;
49
49
50
- /* The modal dialog parent class has a 100ms close animation. Delay long enough for it
51
- * to complete before doing something disruptive like restarting cinnamon */
52
- const DEVEL_COMMAND_DELAY = parseInt ( ModalDialog . OPEN_AND_CLOSE_TIME ) + 10 ;
53
-
54
50
/**
55
51
* completeCommand:
56
52
* @text (string): initial string to complete.
@@ -396,7 +392,9 @@ class RunDialog extends ModalDialog.ModalDialog {
396
392
this . _history . addItem ( input ) ;
397
393
this . _commandError = false ;
398
394
if ( this . _enableInternalCommands && input in DEVEL_COMMANDS ) {
399
- Mainloop . timeout_add ( DEVEL_COMMAND_DELAY , ( ) => DEVEL_COMMANDS [ input ] ( ) ) ;
395
+ /* Delay 10ms past the modalDialog's openAndCloseTime to ensure the dialog
396
+ * is closed before doing something disruptive like restarting cinnamon */
397
+ Mainloop . timeout_add ( this . openAndCloseTime + 10 , ( ) => DEVEL_COMMANDS [ input ] ( ) ) ;
400
398
return ;
401
399
}
402
400
You can’t perform that action at this time.
0 commit comments