get_toplevel_window should return only gtk.WINDOW_TOPLEVEL
issue2707 review410003 (transplanted from a10ed833b61119c2c169356a493023f892e2526b)
This commit is contained in:
1 parent
9b1441447c
commit
f55021fd57
1 file changed
+2
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user