From 04d7af46b3ae5d15418670edb0cdbdfa8f1b6b0b Mon Sep 17 00:00:00 2001 From: Ksaper Date: Wed, 22 Feb 2023 05:17:18 +0200 Subject: [PATCH] Fix prompt disabling other keygrabbers --- widget/app_launcher/init.lua | 4 ++++ widget/app_launcher/prompt.lua | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/widget/app_launcher/init.lua b/widget/app_launcher/init.lua index 9a6c4b7..789fb3d 100644 --- a/widget/app_launcher/init.lua +++ b/widget/app_launcher/init.lua @@ -665,6 +665,10 @@ end --- Hides the app launcher function app_launcher:hide() + if self._private.widget.visible == false then + return + end + self._private.widget.visible = false self._private.prompt:stop() self:emit_signal("visibility", false) diff --git a/widget/app_launcher/prompt.lua b/widget/app_launcher/prompt.lua index eb5621f..b97fcc8 100644 --- a/widget/app_launcher/prompt.lua +++ b/widget/app_launcher/prompt.lua @@ -350,13 +350,19 @@ end function prompt:stop() local wp = self._private + if wp.state == false then + return + end + wp.state = false if self.reset_on_stop == true then self:set_text("") end - awful.keygrabber.stop(wp.grabber) + if wp.grabber then + awful.keygrabber.stop(wp.grabber) + end generate_markup(self) self:emit_signal("stopped", wp.text)