Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,16 @@ public class Atlas.Application : Adw.Application {
}

protected override void startup () {
if (Util.is_on_pantheon ()) {
/*
* Granite.init() calls Gdk.DisplayManager.get() internally without
* initializing Gtk, which is illegal and causes an intentional
* crash since Gtk 4.17. So, initialize Gtk explicitly here as a
* workaround.
* TODO: Remove this when https://github.com/elementary/granite/pull/893 is released
*/
Gtk.init ();
// Apply elementary stylesheet instead of default Adwaita stylesheet
Granite.init ();
}
/*
* Granite.init() calls Gdk.DisplayManager.get() internally without
* initializing Gtk, which is illegal and causes an intentional
* crash since Gtk 4.17. So, initialize Gtk explicitly here as a
* workaround.
* TODO: Remove this when https://github.com/elementary/granite/pull/893 is released
*/
Gtk.init ();
// Apply elementary stylesheet instead of default Adwaita stylesheet
Granite.init ();

base.startup ();

Expand Down
4 changes: 0 additions & 4 deletions src/Util.vala
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
*/

namespace Util {
public static bool is_on_pantheon () {
return Environment.get_variable ("XDG_CURRENT_DESKTOP") == "Pantheon";
}

public static Adw.ColorScheme to_adw_scheme (string str_scheme) {
switch (str_scheme) {
case Define.ColorScheme.DEFAULT:
Expand Down