[gnome-games/gnome-3-36] display-box: Don't hide cursor with opened popovers in windowed mode
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/gnome-3-36] display-box: Don't hide cursor with opened popovers in windowed mode
- Date: Thu, 26 Mar 2020 19:13:09 +0000 (UTC)
commit fcc61381200937de6dafdcdeb7425b340310aa51
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Mar 27 00:08:54 2020 +0500
display-box: Don't hide cursor with opened popovers in windowed mode
While it was fixed for fullscreen, it was still an issue in the regular
window.
data/ui/display-box.ui | 1 +
src/ui/display-box.vala | 5 ++++-
src/ui/display-view.vala | 4 ++++
3 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/data/ui/display-box.ui b/data/ui/display-box.ui
index bcf12333..d637693c 100644
--- a/data/ui/display-box.ui
+++ b/data/ui/display-box.ui
@@ -4,6 +4,7 @@
<template class="GamesDisplayBox" parent="GtkBin">
<property name="visible">True</property>
<signal name="notify::is-showing-snapshots" handler="block_autohide_changed"/>
+ <signal name="notify::is-menu-open" handler="block_autohide_changed"/>
<child>
<object class="GamesFullscreenBox" id="fullscreen_box">
<property name="visible">True</property>
diff --git a/src/ui/display-box.vala b/src/ui/display-box.vala
index 4bce8285..bf0d6f5f 100644
--- a/src/ui/display-box.vala
+++ b/src/ui/display-box.vala
@@ -50,6 +50,7 @@ private class Games.DisplayBox : Gtk.Bin {
public bool can_fullscreen { get; set; }
public string game_title { get; set; }
+ public bool is_menu_open { get; set; }
[GtkChild]
private Gtk.Stack stack;
@@ -82,7 +83,9 @@ private class Games.DisplayBox : Gtk.Bin {
[GtkCallback]
public void block_autohide_changed () {
- fullscreen_box.autohide = !fullscreen_header_bar.is_menu_open && !is_showing_snapshots;
+ fullscreen_box.autohide = !is_menu_open &&
+ !fullscreen_header_bar.is_menu_open &&
+ !is_showing_snapshots;
}
[GtkCallback]
diff --git a/src/ui/display-view.vala b/src/ui/display-view.vala
index 7cc3993b..e325da4d 100644
--- a/src/ui/display-view.vala
+++ b/src/ui/display-view.vala
@@ -105,6 +105,10 @@ private class Games.DisplayView : Object, UiView {
bind_property ("game-title", header_bar,
"game-title", BindingFlags.BIDIRECTIONAL);
+ header_bar.notify["is-menu-open"].connect (() => {
+ box.is_menu_open = header_bar.is_menu_open;
+ });
+
focus_out_timeout_id = -1;
action_group = new SimpleActionGroup ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]