Patch from Denis Mikhalkin to forward KeyRelease events as well as

Fri Aug  1 15:33:59 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtksocket.c: Patch from Denis Mikhalkin to
        forward KeyRelease events as well as KeyPress events.
        (#115597)
This commit is contained in:
Owen Taylor 2003-08-01 19:51:05 +00:00 committed by Owen Taylor
parent 4fbca22e4a
commit f149c99977
6 changed files with 36 additions and 5 deletions

View File

@ -1,3 +1,9 @@
Fri Aug 1 15:33:59 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtksocket.c: Patch from Denis Mikhalkin to
forward KeyRelease events as well as KeyPress events.
(#115597)
Fri Aug 1 15:06:25 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")

View File

@ -1,3 +1,9 @@
Fri Aug 1 15:33:59 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtksocket.c: Patch from Denis Mikhalkin to
forward KeyRelease events as well as KeyPress events.
(#115597)
Fri Aug 1 15:06:25 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")

View File

@ -1,3 +1,9 @@
Fri Aug 1 15:33:59 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtksocket.c: Patch from Denis Mikhalkin to
forward KeyRelease events as well as KeyPress events.
(#115597)
Fri Aug 1 15:06:25 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")

View File

@ -1,3 +1,9 @@
Fri Aug 1 15:33:59 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtksocket.c: Patch from Denis Mikhalkin to
forward KeyRelease events as well as KeyPress events.
(#115597)
Fri Aug 1 15:06:25 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")

View File

@ -1,3 +1,9 @@
Fri Aug 1 15:33:59 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtksocket.c: Patch from Denis Mikhalkin to
forward KeyRelease events as well as KeyPress events.
(#115597)
Fri Aug 1 15:06:25 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")

View File

@ -64,7 +64,7 @@ static void gtk_socket_hierarchy_changed (GtkWidget *widget,
GtkWidget *old_toplevel);
static void gtk_socket_grab_notify (GtkWidget *widget,
gboolean was_grabbed);
static gboolean gtk_socket_key_press_event (GtkWidget *widget,
static gboolean gtk_socket_key_event (GtkWidget *widget,
GdkEventKey *event);
static void gtk_socket_claim_focus (GtkSocket *socket,
gboolean send_event);
@ -194,7 +194,8 @@ gtk_socket_class_init (GtkSocketClass *class)
widget_class->size_allocate = gtk_socket_size_allocate;
widget_class->hierarchy_changed = gtk_socket_hierarchy_changed;
widget_class->grab_notify = gtk_socket_grab_notify;
widget_class->key_press_event = gtk_socket_key_press_event;
widget_class->key_press_event = gtk_socket_key_event;
widget_class->key_release_event = gtk_socket_key_event;
widget_class->focus = gtk_socket_focus;
container_class->remove = gtk_socket_remove;
@ -778,8 +779,8 @@ gtk_socket_grab_notify (GtkWidget *widget,
}
static gboolean
gtk_socket_key_press_event (GtkWidget *widget,
GdkEventKey *event)
gtk_socket_key_event (GtkWidget *widget,
GdkEventKey *event)
{
GtkSocket *socket = GTK_SOCKET (widget);
@ -788,7 +789,7 @@ gtk_socket_key_press_event (GtkWidget *widget,
GdkScreen *screen = gdk_drawable_get_screen (socket->plug_window);
XEvent xevent;
xevent.xkey.type = KeyPress;
xevent.xkey.type = (event->type == GDK_KEY_PRESS) ? KeyPress : KeyRelease;
xevent.xkey.window = GDK_WINDOW_XWINDOW (socket->plug_window);
xevent.xkey.root = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen));
xevent.xkey.time = event->time;