@b4n commented on this pull request.


In src/win32.c:

> +	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?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/4205/review/2585379689@github.com>