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



commit cfaee5cb58471168ff1ff755e6bd12f73345e54c
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 e333794f, 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 d2a1e6b..4d52cce 100644
--- a/src/client/application/geary-application.vala
+++ b/src/client/application/geary-application.vala
@@ -222,11 +222,11 @@ public class GearyApplication : Gtk.Application {
         if (controller.main_window == null)
             return false;
 
-        // 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 6a1edf6..c96a9e5 100644
--- a/src/client/composer/composer-container.vala
+++ b/src/client/composer/composer-container.vala
@@ -19,11 +19,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]