t-wissmann / barpyrus

A python wrapper for lemonbar
Other
33 stars 7 forks source link

Minor fixes and improvements for TrayerWidget #7

Closed preisi closed 5 years ago

preisi commented 5 years ago

This pullrequest contains 2 commits:

The first commit makes the command used by the TrayerWidget configurable in order to enable the usage of other systray programs.

The second commit fixes a racecondition concerning the detection of the trayer window during startup. As of now, the TrayerWatch can (and will) sometimes fail to find a trayer window after having started the trayer process. This is due to the trayer process not having created a window yet. Therefore, TrayerWatch now passively waits for events and checks for existence of a trayer window instead of just stopping due to the failed assert.

t-wissmann commented 5 years ago

The changes themselves look good, but I'm wondering why/if the update works correctly. Shouldn't TrayerWidget have a method as follows?

    def fileno(self):
        return self.trayer.fileno()
t-wissmann commented 5 years ago

Thank you for your PR :-)