Commit 4856da62 authored by Torsten Schönfeld's avatar Torsten Schönfeld
Browse files

Fix incorrect memory management in Gtk2::Gdk::Display::list_devices

We do not own the returned list.
parent 2a8e968a
Overview of changes in Gtk2 <next>
==================================
* Fix incorrect memory management in Gtk2::Gdk::Display::list_devices
Overview of changes in Gtk2 1.2494
==================================
......
#!/usr/bin/perl -w
use strict;
use Gtk2::TestHelper
tests => 26,
tests => 27,
at_least_version => [2, 2, 0, "GdkDisplay is new in 2.2"];
# $Id$
......@@ -32,6 +32,8 @@ ok(!$display -> pointer_is_grabbed());
# $display -> beep();
$display -> sync();
# Do this twice to ensure we did not damage the list.
isa_ok(($display -> list_devices())[0], "Gtk2::Gdk::Device");
isa_ok(($display -> list_devices())[0], "Gtk2::Gdk::Device");
$display -> put_event(Gtk2::Gdk::Event -> new("button-press"));
......
......@@ -69,8 +69,6 @@ gdk_display_list_devices (display)
devices = gdk_display_list_devices (display);
for (i = devices ; i != NULL ; i = i->next)
XPUSHs (sv_2mortal (newSVGdkDevice (i->data)));
g_list_free (devices);
GdkEvent* gdk_display_get_event (GdkDisplay *display)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment