X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-cell-renderer-button.c;h=f312a01900e06bf46dd3b626c59269f91527b550;hb=5b59146f8d0;hp=8b9e9076dcd3f61abe9806e3263f309fe5af78cd;hpb=ff5e81803b409939e921211f1ffd46cb24df33e9;p=pspp diff --git a/src/ui/gui/psppire-cell-renderer-button.c b/src/ui/gui/psppire-cell-renderer-button.c index 8b9e9076dc..f312a01900 100644 --- a/src/ui/gui/psppire-cell-renderer-button.c +++ b/src/ui/gui/psppire-cell-renderer-button.c @@ -340,7 +340,16 @@ psppire_cell_renderer_button_press_event (GtkButton *button, /* Allow right-click events to propagate upward in the widget hierarchy. Otherwise right-click menus, that trigger on a button-press-event on the containing PsppSheetView, will pop up if the button is rendered as - a facade but not if the button widget exists. */ + a facade but not if the button widget exists. + + We have to translate the event's data by hand to be relative to the + 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); + event->window = gdk_window_get_parent (event->window); g_signal_stop_emission_by_name (button, "button-press-event"); return FALSE; }