[PATCH] Make sure the Meh window has focus even if a dialog is displayed

Martin Kolman mkolman at redhat.com
Tue Sep 8 13:24:03 UTC 2015


Make sure that the Meh window is in focus even if the application
that crashed was displaying a dialog at the time of the crash.

This is quite an issue as both Anaconda and Blivet GUI make use of
dialogs and this crash reporting vie Python Meh could be sometimes
prevented by the Meh window not getting focus.

Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
 meh/ui/gui.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meh/ui/gui.py b/meh/ui/gui.py
index d512f6f..2275f9b 100644
--- a/meh/ui/gui.py
+++ b/meh/ui/gui.py
@@ -87,6 +87,11 @@ class MainExceptionWindow(AbstractMainExceptionWindow):
 
         self._main_window = builder.get_object("exceptionWindow")
 
+        # this makes sure the Meh window remains active
+        # even if the exception has been triggered in a dialog
+        window_group = Gtk.WindowGroup()
+        window_group.add_window(self._main_window)
+
         self._traceback_buffer = builder.get_object("tracebackBuffer")
 
         self._traceback_buffer.set_text(longTraceback)
-- 
2.4.3



More information about the anaconda-patches mailing list