[geary/geary-0.12] Further work around issues presenting windows under gnome-shell.



commit 20aa13d6dc4a17d2405c8f93d08b3fb99868a224
Author: Michael James Gratton <mike vee net>
Date:   Wed Apr 11 12:02:42 2018 +1000

    Further work around issues presenting windows under gnome-shell.
    
    Follow-up to Bug 776881 and commit 287fb888, fixes Bug 794264.
    
    * src/client/application/geary-application.vala,
      src/client/composer/composer-container.vala: Use
      GLib.get_monotonic_time() instead of get_real_time() when calling
      Gtk.Window.present_with_time to avoid issues with mutter/gnome-shell
      alt-tabbing.

 src/client/application/geary-application.vala |    4 ++--
 src/client/composer/composer-container.vala   |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/client/application/geary-application.vala b/src/client/application/geary-application.vala
index 54f6ab6..933be38 100644
--- a/src/client/application/geary-application.vala
+++ b/src/client/application/geary-application.vala
@@ -227,11 +227,11 @@ public class GearyApplication : Gtk.Application {
         // called, do so here to prevent an empty window appearing.
         controller.main_window.show_all();
 
-        // Use present_with_time and a made up time so the present
+        // Use present_with_time and a synthesised time so the present
         // actually works, as a work around for Bug 766284
         // <https://bugzilla.gnome.org/show_bug.cgi?id=766284>.
         this.controller.main_window.present_with_time(
-            (uint32) (get_real_time() / 1000)
+            (uint32) (get_monotonic_time() / 1000)
         );
 
         return true;
diff --git a/src/client/composer/composer-container.vala b/src/client/composer/composer-container.vala
index 5091fb9..626207d 100644
--- a/src/client/composer/composer-container.vala
+++ b/src/client/composer/composer-container.vala
@@ -25,11 +25,11 @@ public interface ComposerContainer {
     public abstract Gtk.ApplicationWindow top_window { get; }
 
     public virtual void present() {
-        // Use present_with_time and a made up time so the present
+        // Use present_with_time and a synthesised time so the present
         // actually works, as a work around for Bug 766284
         // <https://bugzilla.gnome.org/show_bug.cgi?id=766284>.
         this.top_window.present_with_time(
-            (uint32) (get_real_time() / 1000)
+            (uint32) (get_monotonic_time() / 1000)
         );
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]