Skip to content

Commit 1c77b3d

Browse files
mmstickjackpot51
authored andcommitted
fix: Holding left click while opening launcher
1 parent 7ffbeac commit 1c77b3d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/keybindings.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,7 @@ export class Keybindings {
1515
constructor(ext: Ext) {
1616
this.ext = ext;
1717
this.global = {
18-
"activate-launcher": () => {
19-
// Do not allow opening the launcher twice
20-
// Ignore when a fullscreen window is active
21-
if (ext.window_search.opened || ext.focus_window()?.meta.is_fullscreen()) {
22-
return
23-
}
24-
25-
ext.tiler.exit(ext);
26-
ext.window_search.open(ext);
27-
},
18+
"activate-launcher": () => ext.window_search.open(ext),
2819
"tile-enter": () => ext.tiler.enter(ext)
2920
};
3021

src/launcher.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ export class Launcher extends search.Search {
295295
}
296296

297297
open(ext: Ext) {
298+
ext.tiler.exit(ext);
299+
298300
// Do not allow opening twice
299301
// Do not activate if the focused window is fullscreen
300302
if (this.opened || ext.focus_window()?.meta.is_fullscreen()) {
@@ -315,6 +317,13 @@ export class Launcher extends search.Search {
315317

316318
super._open(global.get_current_time(), false)
317319

320+
if (!this.dialog.visible) {
321+
this.clear()
322+
this.cancel()
323+
this.close()
324+
return
325+
}
326+
318327
this.dialog.dialogLayout.x = (mon_width / 2) - (this.dialog.dialogLayout.width / 2)
319328

320329
let height = mon_work_area.height >= 900 ? mon_work_area.height / 2 : mon_work_area.height / 3.5

0 commit comments

Comments
 (0)