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-23 12:27:40 +0300
commite4577e0b316eacacb522ee3a5bdd25fff27dae74 (patch)
treeccf62471ced3fa24d5bab6328bdc7a179929a521 /mate-session
parent6d106acfdbc026ab99f53c3133b981f58db61f7d (diff)
downloadmate-session-manager-e4577e0b316eacacb522ee3a5bdd25fff27dae74.tar.bz2
mate-session-manager-e4577e0b316eacacb522ee3a5bdd25fff27dae74.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