[gnome-music/wip/christopherdavis/raise-on-wayland] application: Present the window on Wayland
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/christopherdavis/raise-on-wayland] application: Present the window on Wayland
- Date: Tue, 22 Jan 2019 08:29:55 +0000 (UTC)
commit e66cd47f111b8b59e003a065f164931978c1d5ef
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 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index 17b871b6..9a496093 100644
--- a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -110,4 +110,7 @@ class Application(Gtk.Application):
self._window.get_style_context().add_class('devel')
MediaPlayer2Service(self)
- self._window.present()
+ # gtk_window_present does not work on Wayland.
+ # Use gtk_present_with_time as a workaround instead.
+ # See 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]