From e6d505d60e5f5fb8bfd7d9901251abea3ac9dfaa Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 14 May 2025 19:03:41 +0200 Subject: font-viewer: Bring the window to the front when triggering the app If the app is already open, we need to tell the desktop that the window has been triggered, so it can either bring it to front, or notify the user the window claims attention. This fixes the cases where the font viewer is already open and gets triggered again, e.g. by opening a font or launching it directly. --- font-viewer/font-view.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'font-viewer/font-view.c') diff --git a/font-viewer/font-view.c b/font-viewer/font-view.c index 406b051b..dcbcb658 100644 --- a/font-viewer/font-view.c +++ b/font-viewer/font-view.c @@ -658,6 +658,8 @@ font_view_application_do_open (FontViewApplication *self, gtk_widget_show_all (self->swin_preview); gtk_notebook_set_current_page (GTK_NOTEBOOK (self->notebook), 1); + + gtk_window_present (GTK_WINDOW (self->main_window)); } static gboolean @@ -933,6 +935,8 @@ font_view_application_activate (GApplication *application) G_APPLICATION_CLASS (font_view_application_parent_class)->activate (application); font_view_application_do_overview (self); + + gtk_window_present (GTK_WINDOW (self->main_window)); } static void -- cgit v1.2.1