Пример #1
0
 def do_unmanaged(self, wm_exiting):
     log("unmanaging window: %s (%s - %s)", self, self.corral_window,
         self.client_window)
     self._internal_set_property("owner", None)
     if self.corral_window:
         remove_event_receiver(self.corral_window, self)
         with xswallow:
             for prop in WindowModel.SCRUB_PROPERTIES:
                 X11Window.XDeleteProperty(self.xid, prop)
         if self.client_reparented:
             self.client_window.reparent(gtk.gdk.get_default_root_window(),
                                         0, 0)
             self.client_reparented = False
         self.client_window.set_events(self.client_window_saved_events)
         #it is now safe to destroy the corral window:
         self.corral_window.destroy()
         self.corral_window = None
         # It is important to remove from our save set, even after
         # reparenting, because according to the X spec, windows that are
         # in our save set are always Mapped when we exit, *even if those
         # windows are no longer inferior to any of our windows!* (see
         # section 10. Connection Close).  This causes "ghost windows", see
         # bug #27:
         if self.in_save_set:
             with xswallow:
                 X11Window.XRemoveFromSaveSet(self.xid)
             self.in_save_set = False
         with xswallow:
             X11Window.sendConfigureNotify(self.xid)
         if wm_exiting:
             self.client_window.show_unraised()
     BaseWindowModel.do_unmanaged(self, wm_exiting)
Пример #2
0
 def do_unmanaged(self, wm_exiting):
     log("unmanaging window: %s (%s - %s)", self, self.corral_window,
         self.client_window)
     self._internal_set_property("owner", None)
     if self.corral_window:
         remove_event_receiver(self.corral_window, self)
         geom = None
         #use a new context so we will XSync right here
         #and detect if the window is already gone:
         with XSwallowContext():
             geom = X11Window.getGeometry(self.xid)
         if geom is not None:
             if self.client_reparented:
                 self.client_window.reparent(get_default_root_window(), 0,
                                             0)
             self.client_window.set_events(self.client_window_saved_events)
         self.client_reparented = False
         #it is now safe to destroy the corral window:
         self.corral_window.destroy()
         self.corral_window = None
         # It is important to remove from our save set, even after
         # reparenting, because according to the X spec, windows that are
         # in our save set are always Mapped when we exit, *even if those
         # windows are no longer inferior to any of our windows!* (see
         # section 10. Connection Close).  This causes "ghost windows", see
         # bug #27:
         if self.in_save_set:
             with xswallow:
                 X11Window.XRemoveFromSaveSet(self.xid)
             self.in_save_set = False
         with xswallow:
             X11Window.sendConfigureNotify(self.xid)
         if wm_exiting:
             self.client_window.show_unraised()
     BaseWindowModel.do_unmanaged(self, wm_exiting)
Пример #3
0
 def do_unmanaged(self, wm_exiting):
     log("unmanaging window: %s (%s - %s)", self, self.corral_window, self.client_window)
     self._internal_set_property("owner", None)
     if self.corral_window:
         remove_event_receiver(self.corral_window, self)
         with xswallow:
             for prop in WindowModel.SCRUB_PROPERTIES:
                 X11Window.XDeleteProperty(self.xid, prop)
         if self.client_reparented:
             self.client_window.reparent(gtk.gdk.get_default_root_window(), 0, 0)
             self.client_reparented = False
         self.client_window.set_events(self.client_window_saved_events)
         #it is now safe to destroy the corral window:
         self.corral_window.destroy()
         self.corral_window = None
         # It is important to remove from our save set, even after
         # reparenting, because according to the X spec, windows that are
         # in our save set are always Mapped when we exit, *even if those
         # windows are no longer inferior to any of our windows!* (see
         # section 10. Connection Close).  This causes "ghost windows", see
         # bug #27:
         if self.in_save_set:
             with xswallow:
                 X11Window.XRemoveFromSaveSet(self.xid)
             self.in_save_set = False
         with xswallow:
             X11Window.sendConfigureNotify(self.xid)
         if wm_exiting:
             self.client_window.show_unraised()
     BaseWindowModel.do_unmanaged(self, wm_exiting)