fix: resolve wifi crashes, shell injections, race conditions, and add debug mode
- Remove transient NEED_AUTH/DISCONNECTED error paths from wifi connect - Guard double-callback in connect_wifi_bssid/connect_wifi_with_password - Shell-quote user paths in wallpaper, screenshot, screenrecorder services - Fix OSD hide-timer use-after-free and applet_window stale source ID - Fix brightness poll timer leak on read failure - Fix spotlight search stale idle source removal - Lock dbusmenu _cache mutation under _registry_lock - Fix entry.revision written outside _registry_lock scope - Add fabric-cli exec wrapper for lock screen (lock_screen.lock()) - Replace hyprlock with lock screen in power menu and dropdown - Add debug mode toggle in settings (controls log verbosity) - Add diagnostic logging to globalmenu click chain
This commit is contained in:
26 files changed
+224
-57
No files matched your search
@@ -93,6 +93,7 @@ class ModusControlCenter(AppletWindow):
|
||||
# Initialize network service for WiFi toggle - lazy load
|
||||
self.network_service = None
|
||||
self.wifi_service = None
|
||||
self._network_ready_fired = False
|
||||
|
||||
# Initialize flight mode and caffeine states - lazy load
|
||||
self.caffeine_mode = False
|
||||
@@ -905,9 +906,19 @@ class ModusControlCenter(AppletWindow):
|
||||
logger.warning(f"Failed to toggle bluetooth: {e}")
|
||||
|
||||
def on_network_ready(self, *_):
|
||||
if self._network_ready_fired:
|
||||
return
|
||||
self._network_ready_fired = True
|
||||
self.wifi_service = self.network_service.wifi_device
|
||||
if self.wifi_service:
|
||||
self.wifi_service.connect("notify::wireless-enabled", self.update_wifi_icon)
|
||||
self._signal_connections.append(
|
||||
(
|
||||
self.wifi_service,
|
||||
self.wifi_service.connect(
|
||||
"notify::wireless-enabled", self.update_wifi_icon
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
def update_wifi_icon(self, *_):
|
||||
try:
|
||||
|
||||
@@ -574,9 +574,7 @@ class PlayerBox(Box):
|
||||
current_status = str(self.player.playback_status).lower()
|
||||
self._last_notified_status = current_status
|
||||
self.play_pause_icon.dynamic_file(
|
||||
"player/play.svg"
|
||||
if current_status == "paused"
|
||||
else "player/pause.svg"
|
||||
"player/play.svg" if current_status == "paused" else "player/pause.svg"
|
||||
)
|
||||
self._on_metadata(self.player, self.player._player.props.metadata)
|
||||
self.set_image()
|
||||
|
||||
@@ -275,6 +275,7 @@ class WifiConnections(Box):
|
||||
self._update_in_progress = False # Prevent concurrent updates
|
||||
self._destroyed = False # Track if widget is destroyed
|
||||
self._signal_ids = [] # Track all service signal IDs for cleanup
|
||||
self._network_ready_fired = False # Guard against duplicate device-ready
|
||||
|
||||
self._signal_ids.append(
|
||||
(
|
||||
@@ -437,6 +438,9 @@ class WifiConnections(Box):
|
||||
|
||||
def on_network_ready(self, *_):
|
||||
"""Called when network service is ready"""
|
||||
if self._network_ready_fired:
|
||||
return
|
||||
self._network_ready_fired = True
|
||||
self.wifi_service = self.network_service.wifi_device
|
||||
if self.wifi_service:
|
||||
self.toggle_button.set_active(self.wifi_service.enabled)
|
||||
|
||||
Reference in new issue
Block a user