Skip to contentSkip to conversation

gtk patch queue.

GIT PULL Applied Gerd Hoffmann 2 participants 4 messages Oct 15, 2014 – Oct 22, 2014

lore
Share & tools
lore
#0 lore raw

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(+)
#1 lore raw

[Qemu-devel] [PULL 1/2] gtk.c: Fix memory leak in gd_set_keycode_type()

From: Chen Fan <[email protected]>

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)
---
 ui/gtk.c | 7 +++++++
 1 file changed, 7 insertions(+)
ui/gtk.c +7 -0
index 2345d7e..cdd2567 100644
@@ -1810,6 +1810,13 @@ static void gd_set_keycode_type(GtkDisplayState *s)
             fprintf(stderr, "unknown keycodes `%s', please report to "
                     "[email protected]\n", keycodes);
         }
+
+        if (desc) {
+            XkbFreeKeyboard(desc, XkbGBN_AllComponentsMask, True);
+        }
+        if (keycodes) {
+            XFree(keycodes);
+        }
     }
 #endif
 }
Signature · 1 line
1.8.3.1
#2 lore raw

[Qemu-devel] [PULL 2/2] gtk: add support for the Pause key

In reply to Gerd Hoffmann

From: Martin Decky <[email protected]>

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

---
 ui/gtk.c | 6 ++++++
 1 file changed, 6 insertions(+)
ui/gtk.c +6 -0
index cdd2567..8e055da 100644
@@ -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);
 
Signature · 1 line
1.8.3.1
#3 lore raw
In reply to Gerd Hoffmann
Quoted 16 lines · 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

Quoted 8 lines

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