Add get_sugar_window_type to sugar.wm #571
This commit is contained in:
parent
e3415afbc5
commit
3b0d09a188
@ -66,6 +66,15 @@ def get_bundle_id(wnck_window):
|
|||||||
return prop_info[2]
|
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):
|
def set_activity_id(window, activity_id):
|
||||||
_property_change_trapped(window, '_SUGAR_ACTIVITY_ID', 'STRING', 8,
|
_property_change_trapped(window, '_SUGAR_ACTIVITY_ID', 'STRING', 8,
|
||||||
gtk.gdk.PROP_MODE_REPLACE, activity_id)
|
gtk.gdk.PROP_MODE_REPLACE, activity_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user