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 780714 - ui: deprecation warning during cursor creation.
ui: deprecation warning during cursor creation.
Status: RESOLVED FIXED
Product: gnome-games
Classification: Core
Component: general
3.24.x
Other Linux
: Normal minor
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-30 08:03 UTC by Abhinav Singh
Modified: 2017-05-08 09:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ui: Use Gdk.Cursor.for_display() instead of Gdk.Cursor.new() (1.05 KB, patch)
2017-03-30 08:07 UTC, Abhinav Singh
none Details | Review
ui: Fix deprecation warnings at exit fullscreen (1.14 KB, patch)
2017-03-30 12:22 UTC, Abhinav Singh
committed Details | Review

Description Abhinav Singh 2017-03-30 08:03:22 UTC
Games shows deprecation warning each time fullscreen state is changed.
Gdk.Cursor.new() is deprecated.
Comment 1 Abhinav Singh 2017-03-30 08:07:02 UTC
Created attachment 348973 [details] [review]
ui: Use Gdk.Cursor.for_display() instead of Gdk.Cursor.new()

Gdk.Cursor.new() is deprecated and should not be used for
creation of cursor.

Adrien: Got that from the comment. I think you were looking for the function Gdk.Cursor.for_display()
Comment 2 Adrien Plazas 2017-03-30 10:38:39 UTC
Review of attachment 348973 [details] [review]:

I'm nitpicking, but the shortlogs are supposed to not be longer than 50 chars and the rest of the commit message should not exceed 72 chars per line but should try to feel the lines as much as possible. See https://wiki.gnome.org/Git/CommitMessages.

::: src/ui/display-box.vala
@@ +126,3 @@
 			return;
 
+		window.cursor = show ? null : new Gdk.Cursor.for_display (window.get_display (), Gdk.CursorType.BLANK_CURSOR);

That looks good. :)

For a better readability maybe we should have the display as a variable so this line can be shorter, but it's clearly not a blocker and I'll let you choose which way you prefer.
Comment 3 Abhinav Singh 2017-03-30 12:22:55 UTC
Created attachment 348992 [details] [review]
ui: Fix deprecation warnings at exit fullscreen

For constructing the cursor, use Gdk.Cursor.for_display() instead of
Gdk.Cursor() which is deprecated.
Comment 4 Adrien Plazas 2017-05-08 09:25:05 UTC
Attachment 348992 [details] pushed as cba58c4 - ui: Fix deprecation warnings at exit fullscreen