def cleanup(self): log("cleanup() xsettings_watcher=%s, root_props_watcher=%s", self._xsettings_watcher, self._root_props_watcher) if self.x11_filter: self.x11_filter = None from xpra.x11.gtk_x11.gdk_bindings import cleanup_x11_filter #@UnresolvedImport, @UnusedImport 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) self.upower_resuming_match = None if self.upower_sleeping_match: bus._clean_up_signal_match(self.upower_sleeping_match) self.upower_sleeping_match = None if self.login1_match: bus._clean_up_signal_match(self.login1_match) self.login1_match = None if self.session_bus: if self.screensaver_match: self.session_bus._clean_up_signal_match(self.screensaver_match) self.screensaver_match = None global WINDOW_METHOD_OVERRIDES WINDOW_METHOD_OVERRIDES = {}
def do_cleanup(self): log("do_cleanup() x11_filter=%s", self.x11_filter) if self.x11_filter: self.x11_filter = False cleanup_x11_filter() #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 log("all event receivers have been removed") break except Exception as e: l("failed to remove event receivers: %s", e) if self.fake_xinerama: cleanup_fakeXinerama() with xlog: clean_keyboard_state() #prop_del does its own xsync: self.clean_x11_properties() super().do_cleanup() log("close_gdk_display_source()") close_gdk_display_source()
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, *args): if self._tray: self._tray.cleanup() self._tray = None X11ServerBase.cleanup(self) cleanup_x11_filter() cleanup_all_event_receivers() if self._wm: self._wm.cleanup() self._wm = None if self._has_grab: #normally we set this value when we receive the NotifyUngrab #but at this point in the cleanup, we probably won't, so force set it: self._has_grab = 0 self.X11_ungrab()
def cleanup(self, *args): if self._tray: self._tray.cleanup() self._tray = None X11ServerBase.cleanup(self) cleanup_x11_filter() cleanup_all_event_receivers() if self._wm: self._wm.cleanup() self._wm = None if self._has_grab: #normally we set this value when we receive the NotifyUngrab #but at this point in the cleanup, we probably won't, so force set it: self._has_grab = 0 self.X11_ungrab()
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: with xsync: cleanup_all_event_receivers() except Exception as e: log.error("failed to remove event receivers: %s", e)
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: with xsync: cleanup_all_event_receivers() except Exception as e: log.error("failed to remove event receivers: %s", e)
def do_cleanup(self): self.cancel_resize_timer() X11ServerBase.do_cleanup(self) remove_catchall_receiver("xpra-motion-event", self) cleanup_x11_filter() #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): if self.x11_filter: self.x11_filter = False cleanup_x11_filter() #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 break except Exception as e: l("failed to remove event receivers: %s", e) if self.fake_xinerama: cleanup_fakeXinerama() with xswallow: clean_keyboard_state() GTKServerBase.do_cleanup(self) log("close_gdk_display_source()") close_gdk_display_source()
def cleanup(self): if self.x11_filter: self.x11_filter = False cleanup_x11_filter() ClipboardTimeoutHelper.cleanup(self) self.cleanup_window()