@techee commented on this pull request.
> + const gchar *reg_path = > "Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; + gboolean is_light_theme = TRUE; + DWORD val; + DWORD data_size = sizeof(val); + + g_return_if_fail(GTK_IS_WINDOW(window)); + + if (RegGetValueA(HKEY_CURRENT_USER, reg_path, "AppsUseLightTheme", RRF_RT_DWORD, NULL, &val, &data_size) == ERROR_SUCCESS) + is_light_theme = val; + + if (!is_light_theme) + { + GdkWindow *gdk_window; + + /* make sure the window is realized so the underlying GdkWindow is created */ + gtk_widget_realize(window); > This seems overly risky to me, can't this simply be done in > GtkWidget:realize? Or is this the hack to "avoid color change" mentioned > above? > …as reading https://github.com/geany/geany/issues/4200 showed me you're not > testing more than I am I actually tested it and it worked, I just don't have access to the Windows machine all the time (which is the case right now, I'll only be able to test it the next week). In any case, I didn't like the manual `realize()` either and connecting the signal is a good idea and if it works, it's a better solution. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/4205#discussion_r1936935763 You are receiving this because you are subscribed to this thread. Message ID: <geany/geany/pull/4205/review/2586098...@github.com>