[gnome-software/1572-the-application-isn-t-raised-when-running-in-background] gs-shell: Show the window before activating it



commit 68cb74821a7c908c55227d2fc990f06772ecd9d1
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jan 5 10:41:52 2022 +0100

    gs-shell: Show the window before activating it
    
    The gs_shell_activate() only called gtk_window_present(), which just
    shows the window when it's hidden, which is not enough to gain the focus
    when the Software is activated with the main window hidden. Showing
    the window beforehand makes sure the gtk_window_present() also focuses
    the window. Without this the window can be shown, but stay below
    the other windows.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1572

 src/gs-shell.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 11abeee04..58cbf1c8d 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -164,6 +164,7 @@ gs_shell_modal_dialog_present (GsShell *shell, GtkWindow *window)
 void
 gs_shell_activate (GsShell *shell)
 {
+       gtk_widget_show (GTK_WIDGET (shell));
        gtk_window_present (GTK_WINDOW (shell));
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]