[gnome-control-center] user-accounts: Explicitly set photo_popup transient_for window



commit 936899277ced430cd8be979125caa2e0571e8c62
Author: Felipe Borges <felipeborges gnome org>
Date:   Fri Mar 24 12:50:47 2017 +0100

    user-accounts: Explicitly set photo_popup transient_for window
    
    Instead of relying in the underlying machinery for guessing the
    correct window.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780498

 panels/user-accounts/um-photo-dialog.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/panels/user-accounts/um-photo-dialog.c b/panels/user-accounts/um-photo-dialog.c
index de70b92..7dbed88 100644
--- a/panels/user-accounts/um-photo-dialog.c
+++ b/panels/user-accounts/um-photo-dialog.c
@@ -495,14 +495,21 @@ skip_faces:
 static void
 popup_icon_menu (GtkToggleButton *button, UmPhotoDialog *um)
 {
+        GtkWindow *window;
+
+        window = GTK_WINDOW (gtk_widget_get_toplevel (um->photo_popup));
         if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)) && !gtk_widget_get_visible 
(um->photo_popup)) {
                 gtk_menu_popup_at_widget (GTK_MENU (um->photo_popup),
                                           GTK_WIDGET (button),
                                           GDK_GRAVITY_NORTH_WEST,
                                           GDK_GRAVITY_SOUTH_WEST,
                                           NULL);
+
+                gtk_window_set_transient_for (window, GTK_WINDOW (gtk_widget_get_toplevel 
(um->popup_button)));
         } else {
                 gtk_menu_popdown (GTK_MENU (um->photo_popup));
+
+                gtk_window_set_transient_for (window, NULL);
         }
 }
 


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