[evince] ev-view-presentation: set goto window's parent



commit fdbf8fba366e96ffdfb6df01aeb69f3aed7ad2d2
Author: Jason Crain <jcrain inspiresomeone us>
Date:   Sun Jan 12 12:35:18 2020 -0700

    ev-view-presentation: set goto window's parent
    
    The presentation view has a feature where if you type numbers in
    presentation mode, a text entry popup appears so you can enter a page
    number to navigate to. The popup does not correctly appear when running
    under Wayland and the console shows this message:
    
    "Window 0x562684b01210 is a temporary window without parent, application
    will not be able to position it on screen."
    
    Fix this by using the gtk_window_set_transient_for() function to set the
    popup's parent.

 libview/ev-view-presentation.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c
index d0ff2133..8f22c0f1 100644
--- a/libview/ev-view-presentation.c
+++ b/libview/ev-view-presentation.c
@@ -723,6 +723,7 @@ ev_view_presentation_goto_window_create (EvViewPresentation *pview)
        pview->goto_window = gtk_window_new (GTK_WINDOW_POPUP);
         goto_window = GTK_WINDOW (pview->goto_window);
        gtk_window_set_screen (goto_window, gtk_widget_get_screen (GTK_WIDGET (pview)));
+       gtk_window_set_transient_for (goto_window, toplevel);
 
        if (gtk_window_has_group (toplevel))
                gtk_window_group_add_window (gtk_window_get_group (toplevel), goto_window);


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