In Wayland, Solaar cannot find active process name causing Solaar to print a traceback and Rules do not work
Created by: lieryan
Running Solaar in Wayland causes a lot of crashes that looks like so:
ERROR:logitech_receiver.listener:processing Notification(10,255,00,00,000000)
Traceback (most recent call last):
File "/home/lieryan/Projects/Solaar/lib/logitech_receiver/listener.py", line 193, in run
self._notifications_callback(n)
File "/home/lieryan/Projects/Solaar/lib/solaar/listener.py", line 190, in _notifications_handler
_notifications.process(self.receiver, n)
File "/home/lieryan/Projects/Solaar/lib/logitech_receiver/notifications.py", line 62, in process
return _process_device_notification(device, status, notification)
File "/home/lieryan/Projects/Solaar/lib/logitech_receiver/notifications.py", line 138, in _process_device_notification
return _process_feature_notification(device, status, n, feature)
File "/home/lieryan/Projects/Solaar/lib/logitech_receiver/notifications.py", line 388, in _process_feature_notification
_diversion.process_notification(device, status, n, feature)
File "/home/lieryan/Projects/Solaar/lib/logitech_receiver/diversion.py", line 792, in process_notification
rules.evaluate(feature, notification, device, status, True)
File "/home/lieryan/Projects/Solaar/lib/logitech_receiver/diversion.py", line 248, in evaluate
result = component.evaluate(feature, notification, device, status, result)
File "/home/lieryan/Projects/Solaar/lib/logitech_receiver/diversion.py", line 248, in evaluate
result = component.evaluate(feature, notification, device, status, result)
File "/home/lieryan/Projects/Solaar/lib/logitech_receiver/diversion.py", line 248, in evaluate
result = component.evaluate(feature, notification, device, status, result)
File "/home/lieryan/Projects/Solaar/lib/logitech_receiver/diversion.py", line 343, in evaluate
return active_process_name.startswith(self.process) or active_wm_class_name.startswith(self.process)
AttributeError: 'NoneType' object has no attribute 'startswith'
Digging into diversion.py, it looks like Wayland never send NET_ACTIVE_WINDOW
, so the global variables active_process_name
and active_wm_class_name
are never set.
Possibly because of the traceback, it looks like that the Rules system doesn't work at all.