[gnome-games/wip/exalm/gtk4: 17/48] fullscreen-box: Update cursor
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/gtk4: 17/48] fullscreen-box: Update cursor
- Date: Wed, 21 Aug 2019 22:48:40 +0000 (UTC)
commit 54d35b93fb9f8c7f045506a848d592e9ecddc764
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Mon Aug 19 20:59:23 2019 +0500
fullscreen-box: Update cursor
src/ui/fullscreen-box.vala | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/src/ui/fullscreen-box.vala b/src/ui/fullscreen-box.vala
index c1d903cf..2b5d30c3 100644
--- a/src/ui/fullscreen-box.vala
+++ b/src/ui/fullscreen-box.vala
@@ -175,19 +175,13 @@ private class Games.FullscreenBox : Gtk.Bin, Gtk.Buildable {
}
private void show_cursor (bool show) {
- var window = get_window ();
- if (window == null)
+ if ((show && cursor == null) ||
+ (!show && cursor != null))
return;
- if ((show && window.cursor == null) ||
- (!show && window.cursor != null))
- return;
-
- if (!show) {
- var display = window.get_display ();
- window.cursor = new Gdk.Cursor.from_name (display, "none");
- }
+ if (!show)
+ cursor = new Gdk.Cursor.from_name ("none", null);
else
- window.cursor = null;
+ cursor = null;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]