Re: button_press_event & gdk_pointer_is_grabbed()

"hermanator12002" <[email protected]> Sun, 13 Apr 2003 23:30:02 -0000
Newsgroups gmane.comp.video.gimp.windows.devel
Message-ID <[email protected]>
As is often the case with win32 gtk developers, we're porting 
existing code written for linux/unix.  So in my case, the code in 
question does a pointer_grab for a window who's notebook tab may be 
dragged out of that window, into a new one.  The author of that code 
is using gdk_pointer_is_grabbed to check if a pointer grab already 
exists for that window.. on linux its FALSE and on windows TRUE.  
Probably it isn't necessary to do that check since as the doc says a 
call to gdk_pointer_grab will replace previous ones, but its still 
leaves us with a situation where the same app behaves differently 
depending on the platform.  It would be nice to have a situation 
where bad code behaves the same across platforms as well as good code.

--- In [email protected], Tor Lillqvist <tml@i...> wrote:
>  > > 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.
> 
> But as th documentation for gdk_pointer_is_grabbed() specifies that 
it
> doesn't return TRUE even if the pointer *is* (implicitly) grabbed on
> X11, isn't it wrong to write code that depends on the return value?
> 
> --tml