From: Ben Pfaff Date: Thu, 9 May 2013 04:10:24 +0000 (-0700) Subject: psppire-cell-renderer-button: Don't use gdk_window_coords_to_parent(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67f706f8e1a578f9925f95b7ccb003f0cc1043e6;p=pspp psppire-cell-renderer-button: Don't use gdk_window_coords_to_parent(). It was introduced in GDK 2.22, which is newer than we require. Reported by John Darrington. --- diff --git a/src/ui/gui/psppire-cell-renderer-button.c b/src/ui/gui/psppire-cell-renderer-button.c index c1930518d7..d4071cd71e 100644 --- a/src/ui/gui/psppire-cell-renderer-button.c +++ b/src/ui/gui/psppire-cell-renderer-button.c @@ -346,9 +346,11 @@ psppire_cell_renderer_button_press_event (GtkButton *button, parent window, because the normal GObject signal propagation mechanism won't do it for us. (This might be a hint that we're doing this wrong.) */ - gdk_window_coords_to_parent (event->window, - event->x, event->y, - &event->x, &event->y); + gint x, y; + + gdk_window_get_position (event->window, &x, &y); + event->x += x; + event->y += y; g_signal_stop_emission_by_name (button, "button-press-event"); return FALSE; }