Re: button_press_event & gdk_pointer_is_grabbed()

"hermanator12002" <[email protected]> Sat, 12 Apr 2003 17:27:19 -0000
Newsgroups gmane.comp.video.gimp.windows.devel
Message-ID <[email protected]>
--- In [email protected], Tor Lillqvist <tml@i...> wrote:
> hermanator12002 writes:
>  > I noticed that doing a gdk_pointer_is_grabbed() in a 
>  > button_press_event callback on linux produces FALSE while on 
win32 
>  > TRUE.
> 
> Is this a major issue for you?

It is, as long as it produces a different result depending on the 
platform, as you suggest further down.

> 
>  > Looking at the win32 source code I see that a gdk_pointer_grab 
>  > is done in gdkevents-win32.c, under the comment /* Emulate X11's 
>  > automatic active grab */.  What is automatic active grab, 
> 
> Read the X11 protocol or libX11 spec...
> 
>  > and why is the pointer not automatically grabbed in the X11 code?
> 
> it most probably is, but gdk_pointer_is_grabbed() only checks for
> explicit grabs. The docs for gdk_pointer_is_grabbed() says: "Note 
that
> this does not take the inmplicit pointer grab on button presses into
> account."
> 
> The Win32 version of gdk_pointer_is_grabbed() probably should do the
> same, for compatibility? I.e. one would need to add a global flag to
> gdk-win32 indicating whether a pointer grab is explicit or 
(emulated)
> implicit, and gdk_pointer_is_grabbed() would return TRUE only if an
> explicit grab is active.
> 
> --tml