Re: Grab observation

[email protected] Thu, 04 Sep 2025 11:42:55 -0500
Newsgroups gmane.comp.lib.fox-toolkit.user
Message-ID <[email protected]>
On 2025-09-02 15:13, [email protected] wrote:
> Hi Jeroen,
> 
> I have an observation wrt the grab function.  When a control calls
> this on Linux (e.g., in response to a left click), LeaveNotify and
> EnterNotify events will be generated when XGrabPointer [1] is called,
> which means that onLeave and onEnter will be called on the control,
> even though the control was already "entered".  This is different
> behavior than on Windows, where no leave/enter sequence will occur.
> 
> In my case, this exposed a bug in my code, so it was a happy
> coincidence.  But I wonder if it would be better to somehow suppress
> these events on Linux or to synthesize them on Windows, so that the
> same call sequence would occur on both platforms from the perspective
> of the control?  This would help to avoid platform-specific bugs when
> writing a new FOX control.

David,

When in response to [un]grab, the FXEvent "code" field will be set to
CROSSINGGRAB or CROSSINGUNGRAB.  Otherwise, this will be set to
CROSSINGNORMAL.

When needed, you can look at this field.

   -- JVZ