Пример #1
0
 def make_hello(self, challenge_response=None):
     capabilities = XpraClientBase.make_hello(self, challenge_response)
     add_gtk_version_info(capabilities, gtk)
     for k, v in self.get_keymap_properties().items():
         capabilities[k] = v
     if self.readonly:
         #don't bother sending keyboard info, as it won't be used
         capabilities["keyboard"] = False
     else:
         capabilities["xkbmap_layout"] = nn(self.xkbmap_layout)
         capabilities["xkbmap_variant"] = nn(self.xkbmap_variant)
     capabilities["modifiers"] = self.get_current_modifiers()
     root_w, root_h = get_root_size()
     capabilities["desktop_size"] = [root_w, root_h]
     key_repeat = self._client_extras.get_keyboard_repeat()
     if key_repeat:
         delay_ms, interval_ms = key_repeat
         capabilities["key_repeat"] = (delay_ms, interval_ms)
     capabilities["keyboard_sync"] = self.keyboard_sync and (key_repeat
                                                             is not None)
     if self.mmap_file:
         capabilities["mmap_file"] = self.mmap_file
         capabilities["mmap_token"] = self.mmap_token
     capabilities["randr_notify"] = True
     capabilities["compressible_cursors"] = True
     capabilities["dpi"] = self.dpi
     capabilities["clipboard"] = self.client_supports_clipboard
     capabilities["notifications"] = self.client_supports_notifications
     capabilities["cursors"] = self.client_supports_cursors
     capabilities["bell"] = self.client_supports_bell
     capabilities["encoding_client_options"] = True
     return capabilities
Пример #2
0
 def make_hello(self, challenge_response=None):
     capabilities = XpraClientBase.make_hello(self, challenge_response)
     for k,v in self.get_keymap_properties().items():
         capabilities[k] = v
     capabilities["xkbmap_layout"] = nn(self.xkbmap_layout)
     capabilities["xkbmap_variant"] = nn(self.xkbmap_variant)
     capabilities["clipboard"] = self.clipboard_enabled
     capabilities["notifications"] = self._client_extras.can_notify()
     capabilities["modifiers"] = self.get_current_modifiers()
     root_w, root_h = get_root_size()
     capabilities["desktop_size"] = [root_w, root_h]
     key_repeat = self._client_extras.get_keyboard_repeat()
     if key_repeat:
         delay_ms,interval_ms = key_repeat
         capabilities["key_repeat"] = (delay_ms,interval_ms)
     capabilities["keyboard_sync"] = self.keyboard_sync and (key_repeat is not None)
     if self.mmap_file:
         capabilities["mmap_file"] = self.mmap_file
         capabilities["mmap_token"] = self.mmap_token
     #these should be turned into options:
     capabilities["cursors"] = True
     capabilities["bell"] = True
     #this is to keep compatibility with v0.0.7.36 only
     #and will be removed shortly
     capabilities["keyboard_as_properties"] = True
     capabilities["damage_sequence"] = True
     capabilities["rowstride"] = True
     capabilities["ping"] = True
     capabilities["png_window_icons"] = "png" in ENCODINGS
     return capabilities
Пример #3
0
 def make_hello(self, challenge_response=None):
     capabilities = XpraClientBase.make_hello(self, challenge_response)
     add_gtk_version_info(capabilities, gtk)
     for k,v in self.get_keymap_properties().items():
         capabilities[k] = v
     if self.readonly:
         #don't bother sending keyboard info, as it won't be used
         capabilities["keyboard"] = False
     else:
         capabilities["xkbmap_layout"] = nn(self.xkbmap_layout)
         capabilities["xkbmap_variant"] = nn(self.xkbmap_variant)
     capabilities["modifiers"] = self.get_current_modifiers()
     root_w, root_h = get_root_size()
     capabilities["desktop_size"] = [root_w, root_h]
     capabilities["screen_sizes"] = self.get_screen_sizes()
     key_repeat = self._client_extras.get_keyboard_repeat()
     if key_repeat:
         delay_ms,interval_ms = key_repeat
         capabilities["key_repeat"] = (delay_ms,interval_ms)
     capabilities["keyboard_sync"] = self.keyboard_sync and (key_repeat is not None)
     if self.mmap_file:
         capabilities["mmap_file"] = self.mmap_file
         capabilities["mmap_token"] = self.mmap_token
     capabilities["randr_notify"] = True
     capabilities["compressible_cursors"] = True
     capabilities["dpi"] = self.dpi
     capabilities["clipboard"] = self.client_supports_clipboard
     capabilities["notifications"] = self.client_supports_notifications
     capabilities["cursors"] = self.client_supports_cursors
     capabilities["bell"] = self.client_supports_bell
     capabilities["encoding_client_options"] = True
     capabilities["share"] = self.client_supports_sharing
     return capabilities
Пример #4
0
 def make_hello(self, challenge_response=None):
     capabilities = XpraClientBase.make_hello(self, challenge_response)
     for k, v in self.get_keymap_properties().items():
         capabilities[k] = v
     if self.readonly:
         #don't bother sending keyboard info, as it won't be used
         capabilities["keyboard"] = False
     else:
         capabilities["xkbmap_layout"] = nn(self.xkbmap_layout)
         capabilities["xkbmap_variant"] = nn(self.xkbmap_variant)
     capabilities["clipboard"] = self.clipboard_enabled
     capabilities["notifications"] = self._client_extras.can_notify()
     capabilities["modifiers"] = self.get_current_modifiers()
     root_w, root_h = get_root_size()
     capabilities["desktop_size"] = [root_w, root_h]
     key_repeat = self._client_extras.get_keyboard_repeat()
     if key_repeat:
         delay_ms, interval_ms = key_repeat
         capabilities["key_repeat"] = (delay_ms, interval_ms)
     capabilities["keyboard_sync"] = self.keyboard_sync and (key_repeat
                                                             is not None)
     if self.mmap_file:
         capabilities["mmap_file"] = self.mmap_file
         capabilities["mmap_token"] = self.mmap_token
     capabilities["randr_notify"] = True
     #these should be turned into options:
     capabilities["cursors"] = True
     capabilities["bell"] = True
     capabilities["png_window_icons"] = "png" in ENCODINGS
     return capabilities
Пример #5
0
 def make_hello(self, challenge_response=None):
     capabilities = XpraClientBase.make_hello(self, challenge_response)
     for k, v in self.get_keymap_properties().items():
         capabilities[k] = v
     capabilities["xkbmap_layout"] = nn(self.xkbmap_layout)
     capabilities["xkbmap_variant"] = nn(self.xkbmap_variant)
     capabilities["clipboard"] = self.clipboard_enabled
     capabilities["notifications"] = self._client_extras.can_notify()
     capabilities["modifiers"] = self.get_current_modifiers()
     root_w, root_h = gtk.gdk.get_default_root_window().get_size()
     capabilities["desktop_size"] = [root_w, root_h]
     key_repeat = self._client_extras.get_keyboard_repeat()
     if key_repeat:
         delay_ms, interval_ms = key_repeat
         capabilities["key_repeat"] = (delay_ms, interval_ms)
     capabilities["keyboard_sync"] = self.keyboard_sync and (key_repeat
                                                             is not None)
     if self.mmap_file:
         capabilities["mmap_file"] = self.mmap_file
         capabilities["mmap_token"] = self.mmap_token
     #these should be turned into options:
     capabilities["cursors"] = True
     capabilities["bell"] = True
     #this is to keep compatibility with v0.0.7.36 only
     #and will be removed shortly
     capabilities["keyboard_as_properties"] = True
     capabilities["damage_sequence"] = True
     capabilities["rowstride"] = True
     capabilities["ping"] = True
     capabilities["png_window_icons"] = "png" in ENCODINGS
     return capabilities
Пример #6
0
 def make_hello(self, challenge_response=None):
     capabilities = XpraClientBase.make_hello(self, challenge_response)
     for k,v in self.get_keymap_properties().items():
         capabilities[k] = v
     if self.readonly:
         #don't bother sending keyboard info, as it won't be used
         capabilities["keyboard"] = False
     else:
         capabilities["xkbmap_layout"] = nn(self.xkbmap_layout)
         capabilities["xkbmap_variant"] = nn(self.xkbmap_variant)
     capabilities["clipboard"] = self.clipboard_enabled
     capabilities["notifications"] = self._client_extras.can_notify()
     capabilities["modifiers"] = self.get_current_modifiers()
     root_w, root_h = get_root_size()
     capabilities["desktop_size"] = [root_w, root_h]
     key_repeat = self._client_extras.get_keyboard_repeat()
     if key_repeat:
         delay_ms,interval_ms = key_repeat
         capabilities["key_repeat"] = (delay_ms,interval_ms)
     capabilities["keyboard_sync"] = self.keyboard_sync and (key_repeat is not None)
     if self.mmap_file:
         capabilities["mmap_file"] = self.mmap_file
         capabilities["mmap_token"] = self.mmap_token
     capabilities["randr_notify"] = True
     #these should be turned into options:
     capabilities["cursors"] = True
     capabilities["bell"] = True
     capabilities["png_window_icons"] = "png" in ENCODINGS
     return capabilities
Пример #7
0
 def make_hello(self, challenge_response=None):
     capabilities = XpraClientBase.make_hello(self, challenge_response)
     add_gtk_version_info(capabilities, gtk)
     for k, v in self.get_keymap_properties().items():
         capabilities[k] = v
     if self.readonly:
         #don't bother sending keyboard info, as it won't be used
         capabilities["keyboard"] = False
     else:
         capabilities["xkbmap_layout"] = nn(self.xkbmap_layout)
         capabilities["xkbmap_variant"] = nn(self.xkbmap_variant)
     capabilities["modifiers"] = self.get_current_modifiers()
     root_w, root_h = get_root_size()
     capabilities["desktop_size"] = [root_w, root_h]
     capabilities["screen_sizes"] = self.get_screen_sizes()
     capabilities["client_type"] = "Python/Gtk"
     key_repeat = self._client_extras.get_keyboard_repeat()
     if key_repeat:
         delay_ms, interval_ms = key_repeat
         capabilities["key_repeat"] = (delay_ms, interval_ms)
     capabilities["keyboard_sync"] = self.keyboard_sync and (key_repeat
                                                             is not None)
     if self.mmap_file:
         capabilities["mmap_file"] = self.mmap_file
         capabilities["mmap_token"] = self.mmap_token
     capabilities["randr_notify"] = True
     capabilities["compressible_cursors"] = True
     capabilities["dpi"] = self.dpi
     capabilities["clipboard"] = self.client_supports_clipboard
     capabilities["notifications"] = self.client_supports_notifications
     capabilities["cursors"] = self.client_supports_cursors
     capabilities["bell"] = self.client_supports_bell
     capabilities["encoding_client_options"] = True
     capabilities["rgb24zlib"] = True
     capabilities["share"] = self.client_supports_sharing
     capabilities["auto_refresh_delay"] = int(self.auto_refresh_delay *
                                              1000)
     capabilities["windows"] = self.windows_enabled
     try:
         from wimpiggy.prop import set_xsettings_format
         assert set_xsettings_format
         capabilities["xsettings-tuple"] = True
     except:
         pass
     return capabilities
Пример #8
0
 def make_hello(self, challenge_response=None):
     capabilities = XpraClientBase.make_hello(self, challenge_response)
     add_gtk_version_info(capabilities, gtk)
     for k,v in self.get_keymap_properties().items():
         capabilities[k] = v
     if self.readonly:
         #don't bother sending keyboard info, as it won't be used
         capabilities["keyboard"] = False
     else:
         capabilities["xkbmap_layout"] = nn(self.xkbmap_layout)
         capabilities["xkbmap_variant"] = nn(self.xkbmap_variant)
     capabilities["modifiers"] = self.get_current_modifiers()
     root_w, root_h = get_root_size()
     capabilities["desktop_size"] = [root_w, root_h]
     capabilities["screen_sizes"] = self.get_screen_sizes()
     capabilities["client_type"] = "Python/Gtk"
     key_repeat = self._client_extras.get_keyboard_repeat()
     if key_repeat:
         delay_ms,interval_ms = key_repeat
         capabilities["key_repeat"] = (delay_ms,interval_ms)
     capabilities["keyboard_sync"] = self.keyboard_sync and (key_repeat is not None)
     if self.mmap_file:
         capabilities["mmap_file"] = self.mmap_file
         capabilities["mmap_token"] = self.mmap_token
     capabilities["randr_notify"] = True
     capabilities["compressible_cursors"] = True
     capabilities["dpi"] = self.dpi
     capabilities["clipboard"] = self.client_supports_clipboard
     capabilities["notifications"] = self.client_supports_notifications
     capabilities["cursors"] = self.client_supports_cursors
     capabilities["bell"] = self.client_supports_bell
     capabilities["encoding_client_options"] = True
     capabilities["rgb24zlib"] = True
     capabilities["share"] = self.client_supports_sharing
     capabilities["auto_refresh_delay"] = int(self.auto_refresh_delay*1000)
     capabilities["windows"] = self.windows_enabled
     try:
         from wimpiggy.prop import set_xsettings_format
         assert set_xsettings_format
         capabilities["xsettings-tuple"] = True
     except:
         pass
     return capabilities
Пример #9
0
 def make_hello(self, challenge_response=None):
     capabilities = XpraClientBase.make_hello(self, challenge_response)
     if self.compression_level:
         capabilities["deflate"] = self.compression_level
     if self.xkbmap_layout:
         capabilities["xkbmap_layout"] = self.xkbmap_layout
         if self.xkbmap_variant:
             capabilities["xkbmap_variant"] = self.xkbmap_variant
     for x in ["xkbmap_print", "xkbmap_query", "xmodmap_data",
               "xkbmap_mod_clear", "xkbmap_mod_add", "xkbmap_mod_meanings",
               "xkbmap_mod_managed", "xkbmap_mod_pointermissing", "xkbmap_keycodes"]:
         v = getattr(self, x)
         if v is not None:
             capabilities[x] = v
     #special case: this used to be sent as "keymap" prior to 0.0.7.35:
     if self.xkbmap_print:
         capabilities["keymap"] = self.xkbmap_print
     capabilities["cursors"] = True
     capabilities["bell"] = True
     capabilities["clipboard"] = self.clipboard_enabled
     capabilities["notifications"] = self._client_extras.can_notify()
     (_, _, current_mask) = gtk.gdk.get_default_root_window().get_pointer()
     modifiers = self.mask_to_names(current_mask)
     log.debug("sending modifiers=%s" % str(modifiers))
     capabilities["modifiers"] = modifiers
     root_w, root_h = gtk.gdk.get_default_root_window().get_size()
     capabilities["desktop_size"] = [root_w, root_h]
     capabilities["png_window_icons"] = True
     capabilities["damage_sequence"] = True
     capabilities["rowstride"] = True
     capabilities["ping"] = True
     key_repeat = self._client_extras.get_keyboard_repeat()
     if key_repeat:
         delay_ms,interval_ms = key_repeat
         capabilities["key_repeat"] = (delay_ms,interval_ms)
     capabilities["keyboard_sync"] = self.keyboard_sync and (key_repeat is not None)
     capabilities["keyboard_as_properties"] = True
     if self.mmap_file:
         capabilities["mmap_file"] = self.mmap_file
         capabilities["mmap_token"] = self.mmap_token
     return capabilities
Пример #10
0
 def make_hello(self, challenge_response=None):
     capabilities = XpraClientBase.make_hello(self, challenge_response)
     if self.compression_level:
         capabilities["deflate"] = self.compression_level
     if self.xkbmap_layout:
         capabilities["xkbmap_layout"] = self.xkbmap_layout
         if self.xkbmap_variant:
             capabilities["xkbmap_variant"] = self.xkbmap_variant
     for x in ["xkbmap_print", "xkbmap_query", "xmodmap_data",
               "xkbmap_mod_clear", "xkbmap_mod_add", "xkbmap_mod_meanings",
               "xkbmap_mod_managed", "xkbmap_mod_pointermissing", "xkbmap_keycodes"]:
         v = getattr(self, x)
         if v is not None:
             capabilities[x] = v
     #special case: this used to be sent as "keymap" prior to 0.0.7.35:
     if self.xkbmap_print:
         capabilities["keymap"] = self.xkbmap_print
     capabilities["cursors"] = True
     capabilities["bell"] = True
     capabilities["clipboard"] = self.clipboard_enabled
     capabilities["notifications"] = self._client_extras.can_notify()
     (_, _, current_mask) = gtk.gdk.get_default_root_window().get_pointer()
     modifiers = self.mask_to_names(current_mask)
     log.debug("sending modifiers=%s" % str(modifiers))
     capabilities["modifiers"] = modifiers
     root_w, root_h = gtk.gdk.get_default_root_window().get_size()
     capabilities["desktop_size"] = [root_w, root_h]
     capabilities["png_window_icons"] = True
     capabilities["damage_sequence"] = True
     capabilities["rowstride"] = True
     capabilities["ping"] = True
     key_repeat = self._client_extras.get_keyboard_repeat()
     if key_repeat:
         delay_ms,interval_ms = key_repeat
         capabilities["key_repeat"] = (delay_ms,interval_ms)
     capabilities["keyboard_sync"] = self.keyboard_sync and (key_repeat is not None)
     capabilities["keyboard_as_properties"] = True
     if self.mmap_file:
         capabilities["mmap_file"] = self.mmap_file
         capabilities["mmap_token"] = self.mmap_token
     return capabilities
Пример #11
0
 def make_hello(self, challenge_response=None):
     capabilities = XpraClientBase.make_hello(self, challenge_response)
     capabilities["waste_of_space"] = "\0" * (32*1024)
     return capabilities
Пример #12
0
 def make_hello(self, challenge_response=None):
     capabilities = XpraClientBase.make_hello(self, challenge_response)
     capabilities["waste_of_space"] = "\0" * (32 * 1024)
     return capabilities