New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CommandSet freeze qtile in Wayland #4646
Comments
Do the commands work in Wayland if you bind each of them to a key and use |
can reproduce, investigating... |
threading issue. We have to run the commandset run commands in a separate thread. (not a proper fix but you get the idea where the bug is): diff --git a/libqtile/extension/command_set.py b/libqtile/extension/command_set.py
index 8143fee0..da1a2638 100644
--- a/libqtile/extension/command_set.py
+++ b/libqtile/extension/command_set.py
@@ -78,22 +78,27 @@ class CommandSet(Dmenu):
for cmd in self.pre_commands:
self.qtile.spawn(cmd)
- out = super(CommandSet, self).run(items=self.commands.keys())
-
- try:
- sout = out.rstrip("\n")
- except AttributeError:
- # out is not a string (for example it's a Popen object returned
- # by super(WindowList, self).run() when there are no menu items to
- # list
- return
-
- if sout not in self.commands:
- return
-
- command = self.commands[sout]
-
- if isinstance(command, str):
- self.qtile.spawn(command)
- elif isinstance(command, CommandSet):
- command.run()
+ def r ():
+ out = super(CommandSet, self).run(items=self.commands.keys())
+
+ try:
+ sout = out.rstrip("\n")
+ except AttributeError:
+ # out is not a string (for example it's a Popen object returned
+ # by super(WindowList, self).run() when there are no menu items to
+ # list
+ return
+
+ if sout not in self.commands:
+ return
+
+ command = self.commands[sout]
+
+ if isinstance(command, str):
+ self.qtile.spawn(command)
+ elif isinstance(command, CommandSet):
+ command.run()
+
+ import threading
+ t = threading.Thread(target=r, name="CommandSet")
+ t.start() will make a proper pr later |
Thanks, this indeed solved the problem. |
This issue is stale because it has been open 90 days with no activity. Remove the |
Does #4750 fix this? |
Issue description
Here's a minimal example.
Add the following to default
config.py
:In X11, press print screen and dmenu appear with
Test1
andTest2
options.In Wayland, press print screen and qtile freeze and have to be killed in another tty.
Version
0.23.0
Backend
Wayland (experimental)
Config
No response
Logs
Required
The text was updated successfully, but these errors were encountered: