SecurityCentral / classification-banner

Displays Classification Banner for a Graphical Session
Other
4 stars 7 forks source link

Event callbacks have the wrong signature for GTK 3.x #14

Closed bracketttc closed 1 year ago

bracketttc commented 1 year ago

If you press any key while the banner is focused, the call to keypress fails because it takes an insufficient number of arguments. def keypress(self, event=None): should be something more like def keypress(self, widget=None, event=None):. def restore(self) doesn't actually use any arguments, but could be fixed by accepting (and discarding) positional arguments: def restore(self, *_):.

Fixing the callback signatures starts to reveal other issues. keypress blocks the UI thread, which most window managers object to fairly strenuously. restore is immediately triggered when the banner is hidden and brings the banner back.

Since the feature doesn't work and no one seems to have noticed, should we just rip it out?