Button click bug not GDK_NATIVE_WINDOWS

There was a persistent bug in SOFA Statistics regarding the Preferences bitmap button (wxPython). You would click the button and it would not activate. The associated image would change when you hovered the mouse over the button and the button would appear to have the focus but no click event would fire. Pressing the Enter key or space bar would activate it. Aha! I knew of a similar bug that had affected eclipse on Ubuntu (see What GDK_NATIVE_WINDOWS=1 means) – and setting the env variable GDK_NATIVE_WINDOWS to true was the workaround there. Would that work? Well it did under some circumstances and not others. Very frustrating. But also very interesting now that I know the underlying cause of the bug – namely, a missing event.Skip() at the end of the event triggered by moving the mouse over the Preferences bitmap button. That’s all it was. Nothing whatsoever to do with GDK_NATIVE_WINDOWS really. Adding that missing line solved the problem.