X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-cell-renderer-button.c;h=703ff3ddfd3056572b168dbc095cc58199bb2cd4;hb=a6f1c88d9d4dee24e1f79048c8a5d8274f68c405;hp=8b9e9076dcd3f61abe9806e3263f309fe5af78cd;hpb=04c546cc97483bb87e79184c3e78060fdf296e7d;p=pspp diff --git a/src/ui/gui/psppire-cell-renderer-button.c b/src/ui/gui/psppire-cell-renderer-button.c index 8b9e9076dc..703ff3ddfd 100644 --- a/src/ui/gui/psppire-cell-renderer-button.c +++ b/src/ui/gui/psppire-cell-renderer-button.c @@ -340,7 +340,17 @@ 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.) */ + 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; } @@ -397,7 +407,6 @@ psppire_cell_renderer_button_start_editing (GtkCellRenderer *cell, "xalign", xalign, "yalign", yalign, "path", path, - "slash", cell_button->slash, NULL); g_signal_connect (G_OBJECT (cell_button->button), "clicked",