summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2025-05-14 19:03:41 +0200
committerColomban Wendling <[email protected]>2025-05-14 19:03:41 +0200
commitcdb955910f706a7f77049d93414ddab4737921f5 (patch)
treeaa78cceaed2bc49a90ffe5d12a1fa7e9088208b6
parenta54d97435fd3f53d803aa5230148ddc024e312df (diff)
downloadmate-control-center-font-viewer-present.tar.bz2
mate-control-center-font-viewer-present.tar.xz
font-viewer: Bring the window to the front when triggering the appfont-viewer-present
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.
-rw-r--r--font-viewer/font-view.c4
1 files changed, 4 insertions, 0 deletions
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