- Add escape == cancel behavior back

This commit is contained in:
Ray Strode 2007-10-02 15:04:32 +00:00
parent 81ee859f4b
commit e971512c74
2 changed files with 79 additions and 1 deletions

View File

@ -0,0 +1,72 @@
diff -up gdm-2.20.0/gui/gdmlogin.c.allow-escape gdm-2.20.0/gui/gdmlogin.c
--- gdm-2.20.0/gui/gdmlogin.c.allow-escape 2007-10-02 10:54:33.000000000 -0400
+++ gdm-2.20.0/gui/gdmlogin.c 2007-10-02 11:02:08.000000000 -0400
@@ -2146,6 +2146,20 @@ gdm_set_welcomemsg (void)
g_free (greeting);
}
+static gboolean
+key_press_event (GtkWidget *widget, GdkEventKey *key, gpointer data)
+{
+ if (key->keyval == GDK_Escape)
+ {
+ printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_CANCEL);
+ fflush (stdout);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static void
gdm_login_gui_init (void)
{
@@ -2182,6 +2196,9 @@ gdm_login_gui_init (void)
gtk_widget_set_events (login, GDK_ALL_EVENTS_MASK);
+ g_signal_connect (G_OBJECT (login), "key_press_event",
+ G_CALLBACK (key_press_event), NULL);
+
gtk_window_set_title (GTK_WINDOW (login), _("GDM Login"));
/* connect for fingering */
if (browser_ok && gdm_config_get_bool (GDM_KEY_BROWSER))
diff -up gdm-2.20.0/gui/greeter/greeter.c.allow-escape gdm-2.20.0/gui/greeter/greeter.c
--- gdm-2.20.0/gui/greeter/greeter.c.allow-escape 2007-10-02 10:48:39.000000000 -0400
+++ gdm-2.20.0/gui/greeter/greeter.c 2007-10-02 10:56:34.000000000 -0400
@@ -597,10 +597,16 @@ process_operation (guchar op_code,
static gboolean
key_press_event (GtkWidget *widget, GdkEventKey *key, gpointer data)
{
- if (DOING_GDM_DEVELOPMENT && (key->keyval == GDK_Escape))
+ if (key->keyval == GDK_Escape)
{
- process_operation (GDM_QUIT, NULL);
-
+ if (DOING_GDM_DEVELOPMENT)
+ process_operation (GDM_QUIT, NULL);
+ else
+ {
+ printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_CANCEL);
+ fflush (stdout);
+ }
+
return TRUE;
}
@@ -1360,11 +1366,9 @@ main (int argc, char *argv[])
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- if G_UNLIKELY (DOING_GDM_DEVELOPMENT) {
- g_signal_connect (G_OBJECT (window), "key_press_event",
- G_CALLBACK (key_press_event), NULL);
- }
-
+ g_signal_connect (G_OBJECT (window), "key_press_event",
+ G_CALLBACK (key_press_event), NULL);
+
canvas = gnome_canvas_new_aa ();
GTK_WIDGET_UNSET_FLAGS (canvas, GTK_CAN_FOCUS);
gnome_canvas_set_scroll_region (GNOME_CANVAS (canvas),

View File

@ -16,7 +16,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.20.0
Release: 11%{?dist}
Release: 12%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
@ -67,6 +67,9 @@ Patch40: gdm-2.20.0-fix-default-language.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=482348
Patch41: pixbuf-ref.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=135965
Patch42: gdm-2.20.0-allow-escape.patch
Patch100: gdm-2.20.0-change-defaults.patch
Patch101: stupid-bullets.patch
@ -369,6 +372,9 @@ fi
%{_datadir}/pixmaps/faces/extras/*.jpg
%changelog
* Tue Oct 2 2007 Ray Strode <rstrode@redhat.com> - 1:2.20.0-12
- Add escape == cancel behavior back
* Mon Oct 1 2007 Matthias Clasen <mclasen@redhat.com> - 1:2.20.0-11
- Fix a refcounting problem with user faces