Merge lp:~mardy/autopilot-gtk/lp1176234 into lp:autopilot-gtk

Proposed by Alberto Mardegan
Status: Merged
Approved by: Martin Pitt
Approved revision: 37
Merged at revision: 45
Proposed branch: lp:~mardy/autopilot-gtk/lp1176234
Merge into: lp:autopilot-gtk
Diff against target: 11 lines (+1/-0)
1 file modified
lib/GtkNode.cpp (+1/-0)
To merge this branch: bzr merge lp:~mardy/autopilot-gtk/lp1176234
Reviewer Review Type Date Requested Status
Martin Pitt (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+162713@code.launchpad.net

Commit message

Initialize rect fields to -1

This makes the globalRect variable return negative values (for some reason, not -1 but -2147483648) when the rectangle is offscreen.

Description of the change

Initialize rect fields to -1

This makes the globalRect variable return negative values (for some reason, not -1 but -2147483648) when the rectangle is offscreen.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Martin Pitt (pitti) wrote :

This looks correct to me as a safety measure, but see my comments in bug 1176234 about not being able to reproduce this.

review: Approve
Revision history for this message
Martin Pitt (pitti) wrote :

Even though the bug isn't reproducible, it's a good safety measure anyway to avoid uninitialized values, so I approve this now.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/GtkNode.cpp'
--- lib/GtkNode.cpp 2013-05-07 01:47:49 +0000
+++ lib/GtkNode.cpp 2013-05-07 06:24:24 +0000
@@ -114,6 +114,7 @@
114 builder_wrapper.add("visible", visible);114 builder_wrapper.add("visible", visible);
115 if (visible) {115 if (visible) {
116 gint x, y, width, height;116 gint x, y, width, height;
117 x = y = width = height = -1;
117 atk_component_get_extents(atk_component, &x, &y, &width, &height,118 atk_component_get_extents(atk_component, &x, &y, &width, &height,
118 ATK_XY_SCREEN);119 ATK_XY_SCREEN);
119 GVariant *rect_gvariant = ComposeRectVariant(x, y, width, height);120 GVariant *rect_gvariant = ComposeRectVariant(x, y, width, height);

Subscribers

People subscribed via source and target branches