[gnome-games/wip/exalm/gtk4: 208/238] fullscreen-box: Update cursor
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/gtk4: 208/238] fullscreen-box: Update cursor
- Date: Mon, 19 Aug 2019 20:33:55 +0000 (UTC)
commit 8735f5ae4d6a62f21652a98516f831cd5fe1b873
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 1ce70c7f..53161cd7 100644
--- a/src/ui/fullscreen-box.vala
+++ b/src/ui/fullscreen-box.vala
@@ -178,19 +178,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]