diff --git a/src/Library/Library.blp b/src/Library/Library.blp index 264d102ec..516a90b6f 100644 --- a/src/Library/Library.blp +++ b/src/Library/Library.blp @@ -3,7 +3,7 @@ using Adw 1; Adw.PreferencesWindow library { hide-on-close: true; - modal: true; + modal: false; title: _("Library"); default-height: 700; default-width: 700; diff --git a/src/Library/Library.js b/src/Library/Library.js index 3ed5be23b..5c7cf2c1a 100644 --- a/src/Library/Library.js +++ b/src/Library/Library.js @@ -13,12 +13,11 @@ const demo_dir = Gio.File.new_for_path( export default function Library({ openDemo, - window: appliation_window, + window: application_window, application, }) { const builder = Gtk.Builder.new_from_resource(resource); const window = builder.get_object("library"); - window.set_transient_for(appliation_window); let last_selected; @@ -38,7 +37,9 @@ export default function Library({ widget.connect("activated", () => { last_selected = widget; openDemo(demo.name) - .then(() => window.close()) + .then(() => { + application_window.present(); + }) .catch(logError); }); @@ -53,7 +54,7 @@ export default function Library({ window.present(); last_selected?.grab_focus(); }); - appliation_window.add_action(action_library); + application_window.add_action(action_library); application.set_accels_for_action("win.library", ["O"]); } diff --git a/src/Previewer/Internal.js b/src/Previewer/Internal.js index 4c115301b..3c772cd4c 100644 --- a/src/Previewer/Internal.js +++ b/src/Previewer/Internal.js @@ -1,5 +1,4 @@ import Gtk from "gi://Gtk"; -import Gdk from "gi://Gdk"; import * as postcss from "../lib/postcss.js"; import GLib from "gi://GLib"; import Graphene from "gi://Graphene"; @@ -50,7 +49,7 @@ export default function Internal({ } } - object_root.present_with_time(Gdk.CURRENT_TIME); + object_root.present(); onWindowChange(true); }