Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
perl-Gtk2
Commits
4856da62
Commit
4856da62
authored
Jan 17, 2015
by
Torsten Schönfeld
Browse files
Fix incorrect memory management in Gtk2::Gdk::Display::list_devices
We do not own the returned list.
parent
2a8e968a
Changes
3
Hide whitespace changes
Inline
Side-by-side
NEWS
View file @
4856da62
Overview of changes in Gtk2 <next>
==================================
* Fix incorrect memory management in Gtk2::Gdk::Display::list_devices
Overview of changes in Gtk2 1.2494
==================================
...
...
t/GdkDisplay.t
View file @
4856da62
#!/usr/bin/perl -w
use
strict
;
use
Gtk2::
TestHelper
tests
=>
2
6
,
tests
=>
2
7
,
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
"));
...
...
xs/GdkDisplay.xs
View file @
4856da62
...
...
@@ -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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment