Add get_sugar_window_type to sugar.wm #571

This commit is contained in:
Tomeu Vizoso 2009-09-01 11:53:51 +02:00
parent e3415afbc5
commit 3b0d09a188

View File

@ -66,6 +66,15 @@ def get_bundle_id(wnck_window):
return prop_info[2]
def get_sugar_window_type(wnck_window):
window = gtk.gdk.window_foreign_new(wnck_window.get_xid())
prop_info = _property_get_trapped(window, '_SUGAR_WINDOW_TYPE', 'STRING')
if prop_info is None:
return None
else:
return prop_info[2]
def set_activity_id(window, activity_id):
_property_change_trapped(window, '_SUGAR_ACTIVITY_ID', 'STRING', 8,
gtk.gdk.PROP_MODE_REPLACE, activity_id)