mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-04 22:00:05 +02:00
ft-floatd: a launch for a missing app no longer kills the control socket (#16)
Gio.DesktopAppInfo.new() returns NULL for a desktop file that doesn't
exist, and PyGObject raises TypeError ("constructor returned NULL")
rather than returning None, so launch()'s `if info is None` never ran.
The exception escaped the control socket's GLib callback, GLib dropped
the watch, and ft-floatd stopped answering everything: the float key,
dock, Launch as Standalone, and profiles, until the desktop restarted.
Found on the Frame (2026-10-02): a profile saved with RustDesk's
Flatpak open records its window's app id, com.carriez.flutter_hbb,
which has no desktop file (the Flatpak's is com.rustdesk.RustDesk).
`ft-layout use` on that profile asked ft-floatd to launch it, and
ft-floatd went silent. With this, that launch replies "error no app
com.carriez.flutter_hbb" and the profile's other apps open.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
072a294941
commit
1ebf3692fb
1 file changed
+4
-1
+4
-1
@@ -745,7 +745,10 @@ class Daemon:
|
||||
Returns (reply, pid or None)."""
|
||||
if app:
|
||||
app = app.removesuffix(".desktop")
|
||||
info = Gio.DesktopAppInfo.new(app + ".desktop")
|
||||
try:
|
||||
info = Gio.DesktopAppInfo.new(app + ".desktop")
|
||||
except TypeError: # PyGObject raises for the NULL a missing desktop file returns
|
||||
info = None
|
||||
if info is None:
|
||||
return f"error no app {app}", None
|
||||
pids = []
|
||||
|
||||
Reference in new issue
Block a user