[geary/cherry-pick-1f6f223e] Merge branch 'wip/43-dialogs-not-focused' into 'master'



commit 8e29bec940008258ff295fc454ca5bad2505db61
Author: Michael Gratton <mike vee net>
Date:   Sun Jul 29 01:28:30 2018 +0000

    Merge branch 'wip/43-dialogs-not-focused' into 'master'
    
    Fix dialogs not being focused when first shown
    
    Closes #43
    
    See merge request GNOME/geary!32
    
    (cherry picked from commit 1f6f223e07b7cbf08225098c46c2cd0a6fe6c041)
    
    70db35dd Fix dialogs not having keyboard focus when first shown.

 src/client/application/geary-application.vala | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/client/application/geary-application.vala b/src/client/application/geary-application.vala
index 5c171169..545379ff 100644
--- a/src/client/application/geary-application.vala
+++ b/src/client/application/geary-application.vala
@@ -234,8 +234,11 @@ public class GearyApplication : Gtk.Application {
         // 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>.
+        // Subtract 10ms from the current time to avoid the main
+        // window stealing the focus when presented just before
+        // showing a dialog (issue #43).
         this.controller.main_window.present_with_time(
-            (uint32) (get_monotonic_time() / 1000)
+            (uint32) (get_monotonic_time() / 1000) - 10
         );
 
         return true;


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