From 1ebf3692fbda7f34e413339e6ec86dc829b8a80a Mon Sep 17 00:00:00 2001 From: Patrick McDavid Date: Fri, 2 Oct 2026 21:12:49 -0600 Subject: [PATCH] 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 --- float/ft_floatd.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/float/ft_floatd.py b/float/ft_floatd.py index bc66380..66a81e1 100644 --- a/float/ft_floatd.py +++ b/float/ft_floatd.py @@ -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 = []