John Darrington <j...@darrington.wattle.id.au> writes: > On Mon, Oct 08, 2012 at 11:26:21AM -0700, Ben Pfaff wrote: > John Darrington <j...@darrington.wattle.id.au> writes: > > > On Sun, Sep 02, 2012 at 09:22:55AM -0700, Ben Pfaff wrote: > > Here's what remains. > > > > Variable sheet > > -------------- > > > > Double-clicking on variable names still processes a click after > > switching sheets. > > > > > > I think this patch fixes that problem. I haven't thoroughly tested it > > to see if it causes any other ill effects. > > It works! But I don't understand why it works. Can you explain? > > From > http://developer.gnome.org/gdk/2.24/gdk-Event-Structures.html#GdkEventButton > > Double and triple-clicks result in a sequence of events being received. For > double-clicks the order of events will be: > > 1. GDK_BUTTON_PRESS > 2. GDK_BUTTON_RELEASE > 3. GDK_BUTTON_PRESS > 4. GDK_2BUTTON_PRESS > 5. GDK_BUTTON_RELEASE > > > So what was happening was this: When the var-name was double-clicked, the > view switched > from VarView to DataView as soon as event 4 (GDK_2BUTTON_PRESS) occured. > Then event 5 > (GDK_BUTTON_RELEASE) occured. > > Now the PsppSheetView object is written such that, it decides to edit a cell, > on button > release event. Hence, whichever cell the pointer happended to be in, when the > user lifts > his finger after double clicking, starts to be edited. > > This change ignores button release events on the object unless a > corresponding button press > event was seen.
That makes sense. I hope that you will commit this fix, and include the above in the commit log if not in a source code comment. Thanks so much for tracking this down, I spent a few fruitless hours some time ago working on it. _______________________________________________ pspp-dev mailing list pspp-dev@gnu.org https://lists.gnu.org/mailman/listinfo/pspp-dev