summaryrefslogtreecommitdiff
path: root/mate-session
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-10-17 17:14:21 +0300
committermonsta <[email protected]>2017-10-17 17:14:21 +0300
commit9e8d8ad24ad1025634b2558bc572937e55c64a2c (patch)
tree7f419de41b561ccf4cfb4fc4911905b1bc8468cb /mate-session
parenta671a1c9d2182f99dbadfa724f7404c81e688460 (diff)
downloadmate-session-manager-9e8d8ad24ad1025634b2558bc572937e55c64a2c.tar.bz2
mate-session-manager-9e8d8ad24ad1025634b2558bc572937e55c64a2c.tar.xz
don't lose focus when displaying logout or shutdown dialog
same as done in: https://github.com/mate-desktop/mate-polkit/commit/ed37b52fbfbce5d57d0549fac1a9dca2502f3372 fixes https://github.com/mate-desktop/mate-session-manager/issues/123 fixes https://github.com/mate-desktop/mate-session-manager/issues/140
Diffstat (limited to 'mate-session')
-rw-r--r--mate-session/gsm-manager.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mate-session/gsm-manager.c b/mate-session/gsm-manager.c
index 2e8273a..f76c235 100644
--- a/mate-session/gsm-manager.c
+++ b/mate-session/gsm-manager.c
@@ -40,6 +40,7 @@
#include <gtk/gtk.h> /* for logout dialog */
#include <gio/gio.h> /* for gsettings */
+#include <gdk/gdkx.h>
#include "gsm-manager.h"
#include "gsm-manager-glue.h"
@@ -3185,6 +3186,8 @@ show_shutdown_dialog (GsmManager *manager)
G_CALLBACK (logout_dialog_response),
manager);
gtk_widget_show (dialog);
+ gtk_window_present_with_time (GTK_WINDOW (dialog),
+ gdk_x11_get_server_time (gtk_widget_get_window (GTK_WIDGET (dialog))));
}
static void
@@ -3207,6 +3210,8 @@ show_logout_dialog (GsmManager *manager)
G_CALLBACK (logout_dialog_response),
manager);
gtk_widget_show (dialog);
+ gtk_window_present_with_time (GTK_WINDOW (dialog),
+ gdk_x11_get_server_time (gtk_widget_get_window (GTK_WIDGET (dialog))));
}
static void