def _process_startup_complete(self, packet): log("all the existing windows and system trays have been received") XpraClientBase._process_startup_complete(self, packet) gui_ready() if self.tray: self.tray.ready() self.send_info_request()
def init_packet_handlers(self): XpraClientBase.init_packet_handlers(self) def noop(*args): log("ignoring packet: %s", args) #ignore the following packet types without error: for t in ["new-window", "new-override-redirect", "draw", "cursor", "bell", "notify_show", "notify_close", "ping", "ping_echo", "window-metadata", "configure-override-redirect", "lost-window"]: self._packet_handlers[t] = noop
def init_packet_handlers(self): XpraClientBase.init_packet_handlers(self) def noop(*args): log("ignoring packet: %s", args) #ignore the following packet types without error: for t in [ "new-window", "new-override-redirect", "draw", "cursor", "bell", "notify_show", "notify_close", "ping", "ping_echo", "window-metadata", "configure-override-redirect", "lost-window" ]: self._packet_handlers[t] = noop
def init_packet_handlers(self): XpraClientBase.init_packet_handlers(self) def noop(*args): # pragma: no cover log("ignoring packet: %s", args) #ignore the following packet types without error: #(newer servers should avoid sending us any of those) for t in ( "new-window", "new-override-redirect", "draw", "cursor", "bell", "notify_show", "notify_close", "ping", "ping_echo", "window-metadata", "configure-override-redirect", "lost-window", ): self._packet_handlers[t] = noop
def make_hello(self): caps = XpraClientBase.make_hello(self) caps["session-type"] = get_session_type() #don't try to find the server uuid if this platform cannot run servers.. #(doing so causes lockups on win32 and startup errors on osx) if POSIX and not is_Wayland(): #we may be running inside another server! try: from xpra.server.server_uuid import get_uuid caps["server_uuid"] = get_uuid() or "" except ImportError: pass for x in ( #generic feature flags: "wants_events", "setting-change", "xdg-menu-update", ): caps[x] = True caps.update({ #generic server flags: "share": self.client_supports_sharing, "lock": self.client_lock, }) caps.update({"mouse": True}) caps.update(self.get_keyboard_caps()) for c in CLIENT_BASES: caps.update(c.get_caps(self)) def u(prefix, c): updict(caps, prefix, c, flatten_dicts=False) u("control_commands", self.get_control_commands_caps()) u("platform", get_platform_info()) u("opengl", self.opengl_props) return caps
def make_hello(self): caps = XpraClientBase.make_hello(self) caps["session-type"] = get_session_type() #don't try to find the server uuid if this platform cannot run servers.. #(doing so causes lockups on win32 and startup errors on osx) if MMAP_SUPPORTED: #we may be running inside another server! try: from xpra.server.server_uuid import get_uuid caps["server_uuid"] = get_uuid() or "" except: pass for x in ( #generic feature flags: "notify-startup-complete", "wants_events", "setting-change", ): caps[x] = True #FIXME: the messy bits without proper namespace: caps.update({ #generic server flags: "share": self.client_supports_sharing, "lock": self.client_lock, }) caps.update(self.get_keyboard_caps()) for c in CLIENT_BASES: caps.update(c.get_caps(self)) def u(prefix, c): updict(caps, prefix, c, flatten_dicts=False) u("control_commands", self.get_control_commands_caps()) u("platform", get_platform_info()) return caps
def _process_startup_complete(self, packet): log("all the existing windows and system trays have been received") XpraClientBase._process_startup_complete(self, packet) gui_ready() if self.tray: self.tray.ready() self.send_info_request() msg = "running" try: windows = tuple(self._id_to_window.values()) except AttributeError: pass else: trays = sum(1 for w in windows if w.is_tray()) wins = sum(1 for w in windows if not w.is_tray()) if wins: msg += ", %i window%s" % (wins, engs(wins)) if trays: msg += ", %i tray%s" % (trays, engs(trays)) log.info(msg)
def make_hello(self): caps = XpraClientBase.make_hello(self) caps["session-type"] = get_session_type() #don't try to find the server uuid if this platform cannot run servers.. #(doing so causes lockups on win32 and startup errors on osx) if MMAP_SUPPORTED: #we may be running inside another server! try: from xpra.server.server_uuid import get_uuid caps["server_uuid"] = get_uuid() or "" except: pass for x in ( #generic feature flags: "notify-startup-complete", "wants_events", "setting-change", ): caps[x] = True #FIXME: the messy bits without proper namespace: caps.update({ #generic server flags: "share": self.client_supports_sharing, "lock": self.client_lock, }) #messy unprefixed: caps.update(WindowClient.get_caps(self)) caps.update(DisplayClient.get_caps(self)) caps.update(NetworkState.get_caps(self)) caps.update(Encodings.get_caps(self)) caps.update(ClipboardClient.get_caps(self)) caps.update(self.get_keyboard_caps()) #nicely prefixed: def u(prefix, c): updict(caps, prefix, c, flatten_dicts=False) u("sound", AudioClient.get_audio_capabilities(self)) u("notifications", self.get_notifications_caps()) u("control_commands", self.get_control_commands_caps()) u("platform", get_platform_info()) mmap_caps = MmapClient.get_caps(self) u("mmap", mmap_caps) #pre 2.3 servers only use underscore instead of "." prefix for mmap caps: for k, v in mmap_caps.items(): caps["mmap_%s" % k] = v return caps
def init(self, opts): XpraClientBase.init(self, opts) self.install_signal_handlers() self.glib_init() self.gobject_init()
def __init__(self): gobject.GObject.__init__(self) XpraClientBase.__init__(self)
def run(self): XpraClientBase.run(self) self.glib_mainloop = glib.MainLoop() self.glib_mainloop.run() return self.exit_code
def run(self): #override so we can use a GTK main loop instead XpraClientBase.run(self) Gtk.main() return self.exit_code
def server_connection_established(self): if not XpraClientBase.server_connection_established(self): return False #process the rest from the UI thread: self.idle_add(self.process_ui_capabilities) return True
def signal_cleanup(self): log("UIXpraClient.signal_cleanup()") XpraClientBase.signal_cleanup(self) reaper_cleanup() log("UIXpraClient.signal_cleanup() done")
def init(self, opts): XpraClientBase.init(self, opts) self.glib_init()
def run(self): XpraClientBase.run(self)
def run(self): XpraClientBase.run(self) self.run_loop() return self.exit_code
def run(self): XpraClientBase.run(self) self.gobject_mainloop = gobject.MainLoop() self.gobject_mainloop.run() return self.exit_code
def make_hello(self): capabilities = XpraClientBase.make_hello(self) capabilities["keyboard"] = False return capabilities
def process_packet(self, proto, packet): self.check_server_echo(0) XpraClientBase.process_packet(self, proto, packet)
def __init__(self): self.idle_add = glib.idle_add self.timeout_add = glib.timeout_add self.source_remove = glib.source_remove gobject.GObject.__init__(self) XpraClientBase.__init__(self)
def setup_connection(self, conn): XpraClientBase.setup_connection(self, conn) MmapClient.setup_connection(self, conn)
def make_hello(self, challenge_response=None): capabilities = XpraClientBase.make_hello(self, challenge_response) capabilities["keyboard"] = False return capabilities
def init(self, opts): XpraClientBase.init(self, opts) if self.INSTALL_SIGNAL_HANDLERS: self.install_signal_handlers() self.glib_init() self.gobject_init()