[gnome-music/wip/jfelder/3-32-about-dialog-modal: 1/2] aboutdialog: Present after setting transient window
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/3-32-about-dialog-modal: 1/2] aboutdialog: Present after setting transient window
- Date: Mon, 15 Apr 2019 21:49:09 +0000 (UTC)
commit cc765e7eb02ac492897ad09419a0b02395be9ace
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Apr 15 12:07:52 2019 -0300
aboutdialog: Present after setting transient window
Presenting a window is a big, important operation surrounded
by various constraints. By the time a window is presented,
various informations are sent to the window manager so it
can figure out where to place and size it, etc.
One of such information is the "transient" toplevel: when
presenting a window, this property must be already set, and
not change after; changing it after the window is presented
is undefined, and may or may not work depending on how
advanced the window manager reading the communication socket.
GNOME Music currently sets the transient toplevel after
showing the About dialog, which causes problems already.
Fix that by showing the About dialog only after setting the
transient-for toplevel property.
Fixes http://gitlab.gnome.org/GNOME/gnome-music/issues/261
(cherry picked from commit d8381b89e0e03ace0ffcd4a6347a3969789933cc)
gnomemusic/application.py | 1 +
gnomemusic/widgets/aboutdialog.py | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index 9a496093..f48cadcd 100644
--- a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -91,6 +91,7 @@ class Application(Gtk.Application):
def _about(self, action, param):
about = AboutDialog()
about.props.transient_for = self._window
+ about.show()
@log
def do_startup(self):
diff --git a/gnomemusic/widgets/aboutdialog.py b/gnomemusic/widgets/aboutdialog.py
index 6cd4e8d6..84630b81 100644
--- a/gnomemusic/widgets/aboutdialog.py
+++ b/gnomemusic/widgets/aboutdialog.py
@@ -42,8 +42,6 @@ class AboutDialog(Gtk.AboutDialog):
self.connect("response", self._about_response)
- self.show()
-
@log
def _about_response(self, klass, data=None):
klass.destroy()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]