def _process_mouse_common(self, proto, wid, pointer, modifiers): #adjust pointer position for offset in client: x, y = pointer wx, wy = self.mapped_at[:2] pointer = x - wx, y - wy X11ServerBase._process_mouse_common(self, proto, wid, pointer, modifiers)
def x11_init(self, clobber): X11ServerBase.x11_init(self, clobber) init_x11_filter() self._has_focus = 0 # Do this before creating the Wm object, to avoid clobbering its # selecting SubstructureRedirect. root = gtk.gdk.get_default_root_window() root.set_events(root.get_events() | gtk.gdk.SUBSTRUCTURE_MASK) root.property_change(gtk.gdk.atom_intern("XPRA_SERVER", False), gtk.gdk.atom_intern("STRING", False), 8, gtk.gdk.PROP_MODE_REPLACE, xpra.__version__) add_event_receiver(root, self) ### Create the WM object self._wm = Wm("Xpra", clobber) self._wm.connect("new-window", self._new_window_signaled) self._wm.connect("window-resized", self._window_resized_signaled) self._wm.connect("bell", self._bell_signaled) self._wm.connect("quit", lambda _: self.quit(True)) self.default_cursor_data = None self.last_cursor_serial = None self.send_cursor_pending = False self.cursor_data = None def get_default_cursor(): self.default_cursor_data = get_cursor_image() log("get_default_cursor=%s", self.default_cursor_data) trap.swallow_synced(get_default_cursor) self._wm.enableCursors(True)
def get_info(self, proto): info = X11ServerBase.get_info(self, proto) info["shadow"] = True info["server_type"] = "gtk-shadow" return info
def make_hello(self): capabilities = X11ServerBase.make_hello(self) capabilities["shadow"] = True capabilities["server_type"] = "gtk-shadow" return capabilities
def __init__(self, sockets, opts): ShadowServerBase.__init__(self) X11ServerBase.__init__(self, True, sockets, opts)
def _process_mouse_common(self, proto, wid, pointer, modifiers): #adjust pointer position for offset in client: x, y = pointer wx, wy = self.mapped_at[:2] pointer = x-wx, y-wy X11ServerBase._process_mouse_common(self, proto, wid, pointer, modifiers)
def _add_new_window_common(self, window): wid = X11ServerBase._add_new_window_common(self, window) window.managed_connect("client-contents-changed", self._contents_changed) window.managed_connect("unmanaged", self._lost_window) return wid
def cleanup(self, *args): if self._tray: self._tray.cleanup() self._tray = None X11ServerBase.cleanup(self)
def __init__(self, clobber, sockets, opts): self._tray = None gobject.GObject.__init__(self) X11ServerBase.__init__(self, clobber, sockets, opts)