psppire-cell-renderer-button: Translate coords before propagating event. 20130508010503/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 8 May 2013 05:29:50 +0000 (22:29 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 8 May 2013 05:29:50 +0000 (22:29 -0700)
commit5b59146f8d060754b14eba415dcc9066d8bc7b02
tree020bae424a68db6a21df2aa7b6ccdcf24cde206f
parent0b0ca44889e637251cb5f2dbf3c7fdc4ec8b9bd7
psppire-cell-renderer-button: Translate coords before propagating event.

When propagating a right-click upward, the x and y coordinates in the
event are those for the button, not for the parent window, but the parent
window's signal handlers will expect that they are relative to the parent
window.  This commit makes that so.

Without this commit, the following scenario occurs:

1. Open a dataset with at least two cases.
2. Switch to the Data View
3. Place the pointer over (say) the tenth row header button.
4. Click the left mouse button.
5. Click the right mouse button.
6. The popup menu appears (as it should), but row 1 gets selected instead
   of row 10.

With this commit, in step 6 the correct row is selected.

Bug #38922.
Reported by John Darrington.
src/ui/gui/psppire-cell-renderer-button.c