Subject: Re: [PATCH] git-gui: Fix selected text colors

From: [email-masked]
Date: Mon, 23 Nov 2020 22:50:47 +0200

On Mon, Nov 23, 2020 at 20:03, Stefan Haller <[email-masked]> 
wrote:
> The problem is that it needs to be recalculated when the
> theme changes, and I have trouble testing that because the
> <<ThemeChanged>> event doesn't appear to be sent on Mac, as far as I 
> can
> see.

How are you testing this?

If I put `puts "InitTheme"` into InitTheme which is called on 
ThemeChanged, i can see it being called multiple times after git-gui 
starts, but when I change theme using "echo '*TkTheme: awdark' | xrdb 
-merge -", it is not called.

I suppose that signal is called only when theme is changed inside app. 
Yes, i just tested this, and that event is sent when you change theme 
from the app.

So you can safely put your code inside "color::sync_with_theme".

And We should move call to sync_with_theme from git-gui.sh into 
InitTheme. I don't know why I have not put it there before.