Set the people window transient
This commit is contained in:
parent
a33bdbc8c5
commit
3151281354
@ -74,25 +74,18 @@ class Shell:
|
|||||||
|
|
||||||
return dbus.Interface(proxy_obj, 'com.redhat.Sugar.Activity')
|
return dbus.Interface(proxy_obj, 'com.redhat.Sugar.Activity')
|
||||||
|
|
||||||
def get_current_activity(self):
|
def get_activity_window(self):
|
||||||
window = self._screen.get_active_window()
|
return self._screen.get_active_window()
|
||||||
|
|
||||||
if window and window.is_skip_tasklist():
|
|
||||||
window = self._screen.get_previously_active_window()
|
|
||||||
|
|
||||||
if window and not window.is_skip_tasklist():
|
|
||||||
return self.get_activity_from_xid(window.get_xid())
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
def __people_window_delete_cb(self, window, event):
|
def __people_window_delete_cb(self, window, event):
|
||||||
window.hide()
|
window.hide()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def show_people(self):
|
def show_people(self):
|
||||||
activity = self.get_current_activity()
|
activity_window = self.get_activity_window()
|
||||||
|
if activity_window:
|
||||||
if activity:
|
xid = activity_window.get_xid()
|
||||||
|
activity = self.get_activity_from_xid(xid)
|
||||||
activity_id = activity.get_id()
|
activity_id = activity.get_id()
|
||||||
|
|
||||||
if not self._people_windows.has_key(activity_id):
|
if not self._people_windows.has_key(activity_id):
|
||||||
@ -103,7 +96,10 @@ class Shell:
|
|||||||
else:
|
else:
|
||||||
window = self._people_windows[activity_id]
|
window = self._people_windows[activity_id]
|
||||||
|
|
||||||
self._toggle_window_visibility(window)
|
window.show()
|
||||||
|
|
||||||
|
foreign_activity_win = gtk.gdk.window_foreign_new(xid)
|
||||||
|
window.window.set_transient_for(foreign_activity_win)
|
||||||
|
|
||||||
def toggle_console(self):
|
def toggle_console(self):
|
||||||
self._toggle_window_visibility(self._console.get_window())
|
self._toggle_window_visibility(self._console.get_window())
|
||||||
|
Loading…
Reference in New Issue
Block a user