After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 637895 - gdk_pointer_grab() deprecated comment is not helpful enough.
gdk_pointer_grab() deprecated comment is not helpful enough.
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Documentation
2.91.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-12-23 21:06 UTC by Murray Cumming
Modified: 2018-04-14 23:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Murray Cumming 2010-12-23 21:06:15 UTC
gdk_pointer_grab() is now deprecated:
  http://library.gnome.org/devel/gdk/unstable/gdk3-General.html#gdk-pointer-grab
But the comment just says that we should use gdk_device_grab() instead, without suggesting how we would get the GdkDevice* needed to call that.

I looked at the demo for a hint, but it hasn't been ported yet:
http://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/changedisplay.c#n131

(Demos and tests really should be built with deprecations disabled, I think).
Comment 1 Murray Cumming 2010-12-24 09:30:05 UTC
CCing Javier Jardon, who added the deprecation comment, according to git blame.
Comment 2 Javier Jardón (IRC: jjardon) 2010-12-24 13:49:53 UTC
(In reply to comment #0)
> gdk_pointer_grab() is now deprecated:
>  
> http://library.gnome.org/devel/gdk/unstable/gdk3-General.html#gdk-pointer-grab
> But the comment just says that we should use gdk_device_grab() instead, without
> suggesting how we would get the GdkDevice* needed to call that.

Fixed in commit 30cdab13fe62884457b7c1c35142386e453adfd0

> I looked at the demo for a hint, but it hasn't been ported yet:
> http://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/changedisplay.c#n131

Indeed, seems that gdk_pointer_* and gdk_keyboard_* were not properly deprecated and are still used in GTK+ code. Filled bug #637951
Comment 3 Murray Cumming 2011-04-06 10:53:47 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > gdk_pointer_grab() is now deprecated:
> >  
> > http://library.gnome.org/devel/gdk/unstable/gdk3-General.html#gdk-pointer-grab
> > But the comment just says that we should use gdk_device_grab() instead, without
> > suggesting how we would get the GdkDevice* needed to call that.
> 
> Fixed in commit 30cdab13fe62884457b7c1c35142386e453adfd0

Thanks. That was http://git.gnome.org/browse/gtk+/commit/?id=30cdab13fe62884457b7c1c35142386e453adfd0
Comment 4 Murray Cumming 2011-07-20 07:54:33 UTC
Can we also have a more helpful deprecation hint about the related gdk_keyboard_grab() function?
  http://developer.gnome.org/gdk3/unstable/gdk3-General.html#gdk-keyboard-grab
and maybe some more discussion about keyboard grabs in gdk_device_grab()?

It looks like this should involve gdk_device_get_associated_device().

(I probably shouldn't just reopen this bug, but it seems convenient.)
Comment 5 Murray Cumming 2011-07-20 08:04:19 UTC
gdk_device_grab() has parameters that gdk_pointer_grab() doesn't, such as grab_ownership. Shouldn't the deprecation comment suggest what values to use to get the same behaviour as before?

Can we also have a more helpful deprecation hint about the related gdk_keyboard_grab() function?
  http://developer.gnome.org/gdk3/unstable/gdk3-General.html#gdk-keyboard-grab
and maybe some more discussion about keyboard grabs in the gdk_device_grab() documentation? It looks like this should involve gdk_device_get_associated_device().
Comment 6 Matthias Clasen 2018-02-10 04:54:55 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 7 Matthias Clasen 2018-04-14 23:58:07 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new