[gnome-boxes] Emit proper notifications for App.fullscreen
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Emit proper notifications for App.fullscreen
- Date: Fri, 26 Oct 2012 15:00:59 +0000 (UTC)
commit cc64e334ee5d541f3dcc417efe90d9227380cb72
Author: Alexander Larsson <alexl redhat com>
Date: Fri Oct 26 15:57:54 2012 +0200
Emit proper notifications for App.fullscreen
We don't want to send notify emissions when we set the fullscreen
property as that only requests an async change (reading the property
will not have changed value yet). So, we disable automatic notifcation
for the property and notify manually when the real state changes.
https://bugzilla.gnome.org/show_bug.cgi?id=686938
src/app.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index b74ada5..3fe359b 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -12,6 +12,7 @@ private class Boxes.App: Boxes.UI {
public static App app;
public override Clutter.Actor actor { get { return stage; } }
public Gtk.ApplicationWindow window;
+ [CCode (notify = false)]
public bool fullscreen {
get { return WindowState.FULLSCREEN in window.get_window ().get_state (); }
set {
@@ -21,6 +22,7 @@ private class Boxes.App: Boxes.UI {
window.unfullscreen ();
}
}
+
private bool maximized { get { return WindowState.MAXIMIZED in window.get_window ().get_state (); } }
public Gtk.Notebook notebook;
public ClutterWidget embed;
@@ -404,7 +406,10 @@ private class Boxes.App: Boxes.UI {
return false;
});
- window.window_state_event.connect (() => {
+ window.window_state_event.connect ((event) => {
+ if (WindowState.FULLSCREEN in event.changed_mask)
+ this.notify_property ("fullscreen");
+
if (fullscreen)
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]