qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] gtk patch queue.
@ 2014-10-15 10:40 Gerd Hoffmann
  2014-10-15 10:40 ` [Qemu-devel] [PULL 1/2] gtk.c: Fix memory leak in gd_set_keycode_type() Gerd Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2014-10-15 10:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Two small gtk patches.

please pull,
  Gerd

The following changes since commit b1d28ec6a7dbdaadda39d29322f0de694aeb0b74:

  Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20141010' into staging (2014-10-10 14:55:29 +0100)

are available in the git repository at:


  git://git.kraxel.org/qemu tags/pull-gtk-20141015-1

for you to fetch changes up to 5c960521b8101230bd0d0f5b879e5fd1efdb878b:

  gtk: add support for the Pause key (2014-10-15 11:08:32 +0200)

----------------------------------------------------------------
gtk: fix memory leak, add pause key support.

----------------------------------------------------------------
Chen Fan (1):
      gtk.c: Fix memory leak in gd_set_keycode_type()

Martin Decky (1):
      gtk: add support for the Pause key

 ui/gtk.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 1/2] gtk.c: Fix memory leak in gd_set_keycode_type()
  2014-10-15 10:40 [Qemu-devel] [PULL 0/2] gtk patch queue Gerd Hoffmann
@ 2014-10-15 10:40 ` Gerd Hoffmann
  2014-10-15 10:40 ` [Qemu-devel] [PULL 2/2] gtk: add support for the Pause key Gerd Hoffmann
  2014-10-22 13:49 ` [Qemu-devel] [PULL 0/2] gtk patch queue Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2014-10-15 10:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: Chen Fan, Gerd Hoffmann, Anthony Liguori

From: Chen Fan <chen.fan.fnst@cn.fujitsu.com>

 this memory leak is introduced by the original
 commit 3158a3482b0093e41f2b2596fba50774ea31ae08

 valgrind out showing:
 ==14553== 21,459 (72 direct, 21,387 indirect) bytes in 1 blocks are definitely
 lost in loss record 8,055 of 8,082
 ==14553==    at 0x4A06BC3: calloc (vg_replace_malloc.c:618)
 ==14553==    by 0x80DBFBC: XkbGetKeyboardByName (in /usr/lib64/libX11.so.6.3.0)
 ==14553==    by 0x40C704: gtk_display_init (gtk.c:1798)
 ==14553==    by 0x1AEDC1: main (vl.c:4480)

Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/gtk.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ui/gtk.c b/ui/gtk.c
index 2345d7e..cdd2567 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1810,6 +1810,13 @@ static void gd_set_keycode_type(GtkDisplayState *s)
             fprintf(stderr, "unknown keycodes `%s', please report to "
                     "qemu-devel@nongnu.org\n", keycodes);
         }
+
+        if (desc) {
+            XkbFreeKeyboard(desc, XkbGBN_AllComponentsMask, True);
+        }
+        if (keycodes) {
+            XFree(keycodes);
+        }
     }
 #endif
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 2/2] gtk: add support for the Pause key
  2014-10-15 10:40 [Qemu-devel] [PULL 0/2] gtk patch queue Gerd Hoffmann
  2014-10-15 10:40 ` [Qemu-devel] [PULL 1/2] gtk.c: Fix memory leak in gd_set_keycode_type() Gerd Hoffmann
@ 2014-10-15 10:40 ` Gerd Hoffmann
  2014-10-22 13:49 ` [Qemu-devel] [PULL 0/2] gtk patch queue Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2014-10-15 10:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: Martin Decky, Anthony Liguori, Gerd Hoffmann

From: Martin Decky <martin@decky.cz>

Special handing of the Pause key. Implemented in a similar way as in
ui/sdl.c.

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

diff --git a/ui/gtk.c b/ui/gtk.c
index cdd2567..8e055da 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);
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] gtk patch queue.
  2014-10-15 10:40 [Qemu-devel] [PULL 0/2] gtk patch queue Gerd Hoffmann
  2014-10-15 10:40 ` [Qemu-devel] [PULL 1/2] gtk.c: Fix memory leak in gd_set_keycode_type() Gerd Hoffmann
  2014-10-15 10:40 ` [Qemu-devel] [PULL 2/2] gtk: add support for the Pause key Gerd Hoffmann
@ 2014-10-22 13:49 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2014-10-22 13:49 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On 15 October 2014 11:40, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
> Two small gtk patches.
>
> please pull,
>   Gerd
>
> The following changes since commit b1d28ec6a7dbdaadda39d29322f0de694aeb0b74:
>
>   Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20141010' into staging (2014-10-10 14:55:29 +0100)
>
> are available in the git repository at:
>
>
>   git://git.kraxel.org/qemu tags/pull-gtk-20141015-1
>
> for you to fetch changes up to 5c960521b8101230bd0d0f5b879e5fd1efdb878b:
>
>   gtk: add support for the Pause key (2014-10-15 11:08:32 +0200)
>
> ----------------------------------------------------------------
> gtk: fix memory leak, add pause key support.
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-22 13:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-15 10:40 [Qemu-devel] [PULL 0/2] gtk patch queue Gerd Hoffmann
2014-10-15 10:40 ` [Qemu-devel] [PULL 1/2] gtk.c: Fix memory leak in gd_set_keycode_type() Gerd Hoffmann
2014-10-15 10:40 ` [Qemu-devel] [PULL 2/2] gtk: add support for the Pause key Gerd Hoffmann
2014-10-22 13:49 ` [Qemu-devel] [PULL 0/2] gtk patch queue Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).