Make XTables happier with AW_HUD scheme.

This commit is contained in:
Eratosthenes 2011-01-30 16:48:09 -05:00
parent d01951089b
commit d5ba947ede

View File

@ -67,19 +67,6 @@ class Table(Table_Window):
return None
(self.window, self.parent) = self.get_window_from_xid(self.number)
# def get_window_from_xid(self, id):
# for outside in root.query_tree().children:
# if outside.id == id:
# return (outside, outside.query_tree().parent)
# for inside in outside.query_tree().children:
# if inside.id == id: # GNOME, Xfce
# return (inside, inside.query_tree().parent)
# for wayinside in inside.query_tree().children:
# if wayinside.id == id: # KDE
# parent = wayinside.query_tree().parent
# return (wayinside, parent.query_tree().parent)
# return (None, None)
def get_window_from_xid(self, id):
for top_level in root.query_tree().children:
if top_level.id == id:
@ -120,8 +107,16 @@ class Table(Table_Window):
# as the argument. This should keep the HUD window on top of the table window, as if
# the hud window was a dialog belonging to the table.
# This is the gdkhandle for the HUD window
# X doesn't like calling the foreign_new function in XTables.
# Nope don't know why. Moving it here seems to make X happy.
if self.gdkhandle is None:
self.gdkhandle = gtk.gdk.window_foreign_new(int(self.number))
# This is the gdkhandle for the HUD window
gdkwindow = gtk.gdk.window_foreign_new(window.window.xid)
# Then call set_transient_for on the gdk handle of the HUD window
# with the gdk handle of the table window as the argument.
gdkwindow.set_transient_for(self.gdkhandle)
def treewalk(parent):