[gnome-text-editor/gnome-41] session: raise window when raising page
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor/gnome-41] session: raise window when raising page
- Date: Wed, 6 Oct 2021 17:33:59 +0000 (UTC)
commit 023deec745bba8d4bc6f61372195099c1d479814
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 5 11:16:17 2021 -0700
session: raise window when raising page
In case we're raising a page that is already open when the user requests
a file, try to present the window as well so that we hopefully get raised
by the window manager.
We already call gtk_window_present() if the file is not open, but this
ensures that we do it for the raising case too.
Related #169
src/editor-session.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/editor-session.c b/src/editor-session.c
index ed56b7c..9c98a57 100644
--- a/src/editor-session.c
+++ b/src/editor-session.c
@@ -1269,6 +1269,10 @@ editor_session_open (EditorSession *self,
if ((page = find_page_for_file (self, file)))
{
_editor_page_raise (page);
+
+ if ((window = _editor_page_get_window (page)))
+ gtk_window_present (GTK_WINDOW (window));
+
return page;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]