From 087e04c0162af00931cd253725f9adb7096254ae Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 30 May 2017 12:00:48 +0200 Subject: src/shutdown-dialog.vala: Grab Reboot button focus when user requests a reboot. --- src/shutdown-dialog.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/shutdown-dialog.vala') diff --git a/src/shutdown-dialog.vala b/src/shutdown-dialog.vala index 79e102d..cbe4d7e 100644 --- a/src/shutdown-dialog.vala +++ b/src/shutdown-dialog.vala @@ -200,6 +200,8 @@ public class ShutdownDialog : Gtk.Fixed warning ("Failed to restart: %s", e.message); } }); + if (type == ShutdownDialogType.RESTART) + show.connect(() => { button.grab_focus (); }); } if (LightDM.get_can_shutdown ()) @@ -218,7 +220,7 @@ public class ShutdownDialog : Gtk.Fixed } }); - if (type != ShutdownDialogType.SHUTDOWN) + if (type == ShutdownDialogType.SHUTDOWN) show.connect(() => { button.grab_focus (); }); } -- cgit v1.2.3