From f55021fd57747bc2fb35ceda484a06f73587c638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 19 Jul 2012 09:45:58 +0200 Subject: [PATCH] get_toplevel_window should return only gtk.WINDOW_TOPLEVEL issue2707 review410003 (transplanted from a10ed833b61119c2c169356a493023f892e2526b) --- tryton/common/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tryton/common/common.py b/tryton/common/common.py index 815f2ee685..0f4dd0c5d4 100644 --- a/tryton/common/common.py +++ b/tryton/common/common.py @@ -255,7 +255,8 @@ def request_server(server_widget): def get_toplevel_window(): windows = [x for x in gtk.window_list_toplevels() - if x.window and x.props.visible] + if x.window and x.props.visible + and x.get_window_type() == gtk.WINDOW_TOPLEVEL] trans2windows = dict((x.get_transient_for(), x) for x in windows) for window in set(windows) - set(trans2windows.iterkeys()): return window