[gnome-music/wip/christopherdavis/raise-on-wayland] application: Present the window on Wayland



commit 6e6a580c5e9d5da873d75e3cc05fbbe792355228
Author: Christopher Davis <brainblasted disroot org>
Date:   Mon Jan 21 21:46:39 2019 -0500

    application: Present the window on Wayland
    
    For some reason regular present() doesn't work on Wayland.
    This means that Wayland users cannot raise the window by clicking on the MPRIS player.
    
    This patch makes it present at the current time, and does
    not affect the functionality on X11.
    
    See https://gitlab.gnome.org/GNOME/gtk/issues/624#note_10996

 gnomemusic/application.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index 17b871b6..7863c8e1 100644
--- a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -110,4 +110,5 @@ class Application(Gtk.Application):
                 self._window.get_style_context().add_class('devel')
             MediaPlayer2Service(self)
 
-        self._window.present()
+        # https://gitlab.gnome.org/GNOME/gtk/issues/624#note_10996
+        self._window.present_with_time(GLib.get_monotonic_time() / 1000)


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