File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,9 @@ export class Keybindings {
16
16
this . ext = ext ;
17
17
this . global = {
18
18
"activate-launcher" : ( ) => {
19
+ // Do not allow opening the launcher twice
19
20
// Ignore when a fullscreen window is active
20
- if ( ext . focus_window ( ) ?. meta . is_fullscreen ( ) ) {
21
+ if ( ext . window_search . opened || ext . focus_window ( ) ?. meta . is_fullscreen ( ) ) {
21
22
return
22
23
}
23
24
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ export class Launcher extends search.Search {
29
29
service : null | service . LauncherService = null
30
30
append_id : null | number = null
31
31
active_menu : null | any = null
32
+ opened : boolean = false
32
33
33
34
constructor ( ext : Ext ) {
34
35
super ( )
@@ -42,6 +43,7 @@ export class Launcher extends search.Search {
42
43
this . cancel = ( ) => {
43
44
ext . overlay . visible = false
44
45
this . stop_services ( ext )
46
+ this . opened = false
45
47
}
46
48
47
49
this . search = ( pat : string ) => {
@@ -293,17 +295,19 @@ export class Launcher extends search.Search {
293
295
}
294
296
295
297
open ( ext : Ext ) {
298
+ // Do not allow opening twice
296
299
// Do not activate if the focused window is fullscreen
297
- if ( ext . focus_window ( ) ?. meta . is_fullscreen ( ) ) {
300
+ if ( this . opened || ext . focus_window ( ) ?. meta . is_fullscreen ( ) ) {
298
301
return
299
302
}
300
303
304
+ this . opened = true
305
+
301
306
const active_monitor = ext . active_monitor ( )
302
307
const mon_work_area = ext . monitor_work_area ( active_monitor )
303
308
const mon_area = ext . monitor_area ( active_monitor )
304
309
const mon_width = mon_area ? mon_area . width : mon_work_area . width
305
310
306
-
307
311
super . cleanup ( )
308
312
309
313
this . start_services ( )
You can’t perform that action at this time.
0 commit comments