diff mbox

gtk: add support for the Pause key

Message ID 54184378.6040100@decky.cz
State New
Headers show

Commit Message

Martin Decky Sept. 16, 2014, 2:04 p.m. UTC
Special handing of the Pause key. Implemented in a similar way as in
ui/sdl.c.

Signed-off-by: Martin Decky <martin@decky.cz>
---
  ui/gtk.c | 6 ++++++
  1 file changed, 6 insertions(+)

Comments

Martin Decky Sept. 28, 2014, 2:54 p.m. UTC | #1
http://patchwork.ozlabs.org/patch/390074/

It is a rather simple patch adding support for the Pause key in the GTK
UI. It should not cause any regressions. Please apply.  Thanks.


M.D.

On 16-09-2014 16:04, Martin Decky wrote:
> Special handing of the Pause key. Implemented in a similar way as in
> ui/sdl.c.
>
> Signed-off-by: Martin Decky <martin@decky.cz>
> ---
>   ui/gtk.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/ui/gtk.c b/ui/gtk.c
> index 2345d7e..e52cab1 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -931,6 +931,12 @@ static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
>       int qemu_keycode;
>       int i;
>
> +    if (key->keyval == GDK_KEY_Pause) {
> +        qemu_input_event_send_key_qcode(vc->gfx.dcl.con, Q_KEY_CODE_PAUSE,
> +                                        key->type == GDK_KEY_PRESS);
> +        return TRUE;
> +    }
> +
>       qemu_keycode = gd_map_keycode(s, gtk_widget_get_display(widget),
>                                     gdk_keycode);
>
Gerd Hoffmann Sept. 29, 2014, 8:22 a.m. UTC | #2
On So, 2014-09-28 at 16:54 +0200, Martin Decky wrote:
> http://patchwork.ozlabs.org/patch/390074/
> 
> It is a rather simple patch adding support for the Pause key in the GTK
> UI. It should not cause any regressions. Please apply.  Thanks.

Patch looks good but doesn't apply any more.  Can you please rebase &
resend?

thanks,
  Gerd
diff mbox

Patch

diff --git a/ui/gtk.c b/ui/gtk.c
index 2345d7e..e52cab1 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -931,6 +931,12 @@  static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
      int qemu_keycode;
      int i;
  
+    if (key->keyval == GDK_KEY_Pause) {
+        qemu_input_event_send_key_qcode(vc->gfx.dcl.con, Q_KEY_CODE_PAUSE,
+                                        key->type == GDK_KEY_PRESS);
+        return TRUE;
+    }
+
      qemu_keycode = gd_map_keycode(s, gtk_widget_get_display(widget),
                                    gdk_keycode);