def do_cleanup(self): self.cancel_resize_timer() X11ServerBase.do_cleanup(self) remove_catchall_receiver("xpra-motion-event", self) cleanup_x11_filter() with xswallow: cleanup_all_event_receivers()
def cleanup(self): log("cleanup() xsettings_watcher=%s, root_props_watcher=%s", self._xsettings_watcher, self._root_props_watcher) if self.x11_filter: from xpra.x11.gtk2.gdk_bindings import cleanup_x11_filter #@UnresolvedImport self.x11_filter = None cleanup_x11_filter() if self._xsettings_watcher: self._xsettings_watcher.cleanup() self._xsettings_watcher = None if self._root_props_watcher: self._root_props_watcher.cleanup() self._root_props_watcher = None if self.system_bus: bus = self.system_bus log("cleanup() system bus=%s, matches: %s", bus, (self.upower_resuming_match, self.upower_sleeping_match, self.login1_match)) self.system_bus = None if self.upower_resuming_match: bus._clean_up_signal_match(self.upower_resuming_match) if self.upower_sleeping_match: bus._clean_up_signal_match(self.upower_sleeping_match) if self.login1_match: bus._clean_up_signal_match(self.login1_match) global WINDOW_METHOD_OVERRIDES WINDOW_METHOD_OVERRIDES = {}
def cleanup(self): #this must be called from the UI thread! remove_event_receiver(self._root, self) self._root.set_events(self._saved_event_mask) if self._own_x11_filter: #only remove the x11 filter if we initialized it (ie: when running in client) try: with xsync: cleanup_x11_filter() except Exception as e: log.error("failed to remove x11 event filter: %s", e) #try a few times: #errors happen because windows are being destroyed #(even more so when we cleanup) #and we don't really care too much about this for l in (log, log, log, log, log.warn): try: with xsync: cleanup_all_event_receivers() #all went well, we're done return except Exception as e: l("failed to remove event receivers: %s", e)
def do_cleanup(self, *args): X11ServerBase.do_cleanup(self) remove_catchall_receiver("xpra-motion-event", self) cleanup_x11_filter() with xswallow: cleanup_all_event_receivers()