Skip to content

Set preferred color scheme from GisDriver::startup()

Will Thompson requested to merge wip/wjt/223-set-color-scheme-in-startup into master

Previously, adw_style_manager_get_default() was called in main() in order to set the application's preference for the light style. This was incorrect because adw_init() was only (implicitly) called from GisDriver's startup() function, by way of chaining up to AdwApplication's startup(), and adw_style_manager_get_default() may only be used after adw_init() has been called.

This becomes an active problem in GTK 4.17.0 which made accessing the default display (which this call does) before calling gtk_init() a fatal error.

Fixes: #223 (closed)

Merge request reports

Loading