Re: gdk_pointer_grab bug? (WAS: How do I get the GdkWindow from a GtkWindow)




Jens <axon@isl.is> writes:

> Tim Janik wrote:
> 
> > On Sat, 19 Feb 2000, Jens wrote:
> >
> > > Hi
> > >
> > > I want t be able to grab the mouse pointer and confine it to a window. I
> > > plan on using the function gdk_pointer_grab but the problem is I don't
> > > have a GdkWindow pointer, just a GtkWindow pointer as I am using GTK+ to
> > > create my widgets.
> >
> > these sorts of questions are highly off-topic for the gtk development list,
> > post them to gtk-list@redhat.com or the gtk application development list
> > gtk-app-devel-list@redhat.com.
> >
> > > Is it possible to get the GtkWindow that GdkWindow is using and pass
> > > that to the grab function?
> >
> > yes, access GTK_WIDGET (window)->window afer the widget has been realized.
> 
> Before I file a bug report I would like to see if someone else has encountered
> the following before:
> 
> When I call gdk_pointer_grab with GDK_ALL_EVENTS_MASK I get the following
> error:
> 
> Gdk-ERROR **: BadValue (integer parameter out of range for operation)
>   serial 202 error_code 2 request_code 26 minor_code 0
> 
> It turns out that the highest value that passes is 249, like this:
> 
> gdk_pointer_grab(myWindow->window, TRUE, 249,
>       myWindow->window, NULL, GDK_CURRENT_TIME);
> 
> This can't be normal?

The only events which are allowed in the mask for gdk_pointer_grab (or XGrabPointer)
are the events relating to the pointer.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]