[gnome-games] ui: Fix deprecation warnings at exit fullscreen
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] ui: Fix deprecation warnings at exit fullscreen
- Date: Mon, 8 May 2017 09:24:59 +0000 (UTC)
commit cba58c446a69672bc1dd6643196de455d4afd918
Author: theawless <theawless gmail com>
Date: Thu Mar 30 17:20:21 2017 +0530
ui: Fix deprecation warnings at exit fullscreen
For constructing the cursor, use Gdk.Cursor.for_display() instead of
Gdk.Cursor() which is deprecated.
https://bugzilla.gnome.org/show_bug.cgi?id=780714
src/ui/display-box.vala | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/ui/display-box.vala b/src/ui/display-box.vala
index 5a018a2..b82e037 100644
--- a/src/ui/display-box.vala
+++ b/src/ui/display-box.vala
@@ -125,9 +125,12 @@ private class Games.DisplayBox : Gtk.EventBox {
(!show && window.cursor != null))
return;
- // FIXME Gdk.Cursor.new() is deprecated but I didn't manage to make
- // Gdk.Cursor.from_display().
- window.cursor = show ? null : new Gdk.Cursor (Gdk.CursorType.BLANK_CURSOR);
+ if (!show) {
+ var display = window.get_display ();
+ window.cursor = new Gdk.Cursor.for_display (display, Gdk.CursorType.BLANK_CURSOR);
+ }
+ else
+ window.cursor = null;
}
private void set_display (Gtk.Widget display) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]