コード例 #1
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def destroy_window(self, wid, window):
     #override so we can cleanup the group-leader if needed,
     UIXpraClient.destroy_window(self, wid, window)
     group_leader = window.group_leader
     if group_leader is None or len(self._group_leader_wids)==0:
         return
     wids = self._group_leader_wids.get(group_leader)
     if wids is None:
         #not recorded any window ids on this group leader
         #means it is another managed window, leave it alone
         return
     if wid in wids:
         wids.remove(wid)
     if len(wids)>0:
         #still has another window pointing to it
         return
     #the last window has gone, we can remove the group leader,
     #find all the references to this group leader:
     del self._group_leader_wids[group_leader]
     refs = []
     for ref, gl in self._ref_to_group_leader.items():
         if gl==group_leader:
             refs.append(ref)
     for ref in refs:
         del self._ref_to_group_leader[ref]
     log("last window for refs %s is gone, destroying the group leader %s", refs, group_leader)
     group_leader.destroy()
コード例 #2
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def destroy_window(self, wid, window):
     #override so we can cleanup the group-leader if needed,
     UIXpraClient.destroy_window(self, wid, window)
     group_leader = window.group_leader
     if group_leader is None or len(self._group_leader_wids) == 0:
         return
     wids = self._group_leader_wids.get(group_leader)
     if wids is None:
         #not recorded any window ids on this group leader
         #means it is another managed window, leave it alone
         return
     if wid in wids:
         wids.remove(wid)
     if len(wids) > 0:
         #still has another window pointing to it
         return
     #the last window has gone, we can remove the group leader,
     #find all the references to this group leader:
     del self._group_leader_wids[group_leader]
     refs = []
     for ref, gl in self._ref_to_group_leader.items():
         if gl == group_leader:
             refs.append(ref)
     for ref in refs:
         del self._ref_to_group_leader[ref]
     log("last window for refs %s is gone, destroying the group leader %s",
         refs, group_leader)
     group_leader.destroy()
コード例 #3
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def cleanup(self):
     if self.session_info:
         self.session_info.destroy()
         self.session_info = None
     if self.bug_report:
         self.bug_report.destroy()
         self.bug_report = None
     UIXpraClient.cleanup(self)
コード例 #4
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def run(self):
     UIXpraClient.run(self)
     gtk_main_quit_on_fatal_exceptions_enable()
     self.gtk_main()
     log(
         "GTKXpraClient.run_main_loop() main loop ended, returning exit_code=%s",
         self.exit_code)
     return self.exit_code
コード例 #5
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def cleanup(self):
     if self.session_info:
         self.session_info.destroy()
         self.session_info = None
     if self.bug_report:
         self.bug_report.destroy()
         self.bug_report = None
     UIXpraClient.cleanup(self)
コード例 #6
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def process_ui_capabilities(self):
     UIXpraClient.process_ui_capabilities(self)
     if self.server_randr:
         display = display_get_default()
         i = 0
         while i < display.get_n_screens():
             screen = display.get_screen(i)
             screen.connect("size-changed", self.screen_size_changed)
             i += 1
コード例 #7
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def run(self):
     log("run() HAS_X11_BINDINGS=%s", HAS_X11_BINDINGS)
     if HAS_X11_BINDINGS:
         self.setup_frame_request_windows()
     UIXpraClient.run(self)
     gtk_main_quit_on_fatal_exceptions_enable()
     self.gtk_main()
     log("GTKXpraClient.run_main_loop() main loop ended, returning exit_code=%s", self.exit_code)
     return  self.exit_code
コード例 #8
0
 def run(self):
     log("run() HAS_X11_BINDINGS=%s", HAS_X11_BINDINGS)
     if HAS_X11_BINDINGS:
         self.setup_frame_request_windows()
     UIXpraClient.run(self)
     gtk_main_quit_on_fatal_exceptions_enable()
     self.gtk_main()
     log("GTKXpraClient.run_main_loop() main loop ended, returning exit_code=%s", self.exit_code)
     return  self.exit_code
コード例 #9
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def process_ui_capabilities(self, capabilities):
     UIXpraClient.process_ui_capabilities(self, capabilities)
     if self.server_randr:
         display = display_get_default()
         i=0
         while i<display.get_n_screens():
             screen = display.get_screen(i)
             screen.connect("size-changed", self.screen_size_changed)
             i += 1
コード例 #10
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def __init__(self):
     GObjectXpraClient.__init__(self)
     UIXpraClient.__init__(self)
     self.session_info = None
     self.bug_report = None
     self.start_new_command = None
     #opengl bits:
     self.client_supports_opengl = False
     self.opengl_enabled = False
     self.opengl_props = {}
     self.gl_texture_size_limit = 0
コード例 #11
0
 def __init__(self):
     GObjectXpraClient.__init__(self)
     UIXpraClient.__init__(self)
     self.session_info = None
     self.bug_report = None
     self.start_new_command = None
     #opengl bits:
     self.client_supports_opengl = False
     self.opengl_enabled = False
     self.opengl_props = {}
     self.gl_texture_size_limit = 0
コード例 #12
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def cleanup(self):
     if self.session_info:
         self.session_info.destroy()
         self.session_info = None
     if self.bug_report:
         self.bug_report.destroy()
         self.bug_report = None
     if self.start_new_command:
         self.start_new_command.destroy()
         self.start_new_command = None
     UIXpraClient.cleanup(self)
コード例 #13
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def cleanup(self):
     if self.session_info:
         self.session_info.destroy()
         self.session_info = None
     if self.bug_report:
         self.bug_report.destroy()
         self.bug_report = None
     if self.start_new_command:
         self.start_new_command.destroy()
         self.start_new_command = None
     UIXpraClient.cleanup(self)
コード例 #14
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def cleanup(self):
     if self.session_info:
         self.session_info.destroy()
         self.session_info = None
     if self.bug_report:
         self.bug_report.destroy()
         self.bug_report = None
     self.close_file_size_warning()
     self.close_file_upload_dialog()
     if self.start_new_command:
         self.start_new_command.destroy()
         self.start_new_command = None
     UIXpraClient.cleanup(self)
コード例 #15
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def cleanup(self):
     if self.session_info:
         self.session_info.destroy()
         self.session_info = None
     if self.bug_report:
         self.bug_report.destroy()
         self.bug_report = None
     self.close_file_size_warning()
     self.close_file_upload_dialog()
     if self.start_new_command:
         self.start_new_command.destroy()
         self.start_new_command = None
     UIXpraClient.cleanup(self)
コード例 #16
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def make_hello(self):
     capabilities = UIXpraClient.make_hello(self)
     capabilities["named_cursors"] = len(cursor_types) > 0
     #we need the bindings to support initiate-moveresize (posix only for now):
     from xpra.client.gtk_base.gtk_client_window_base import HAS_X11_BINDINGS
     capabilities["window.initiate-moveresize"] = HAS_X11_BINDINGS
     capabilities.update(get_gtk_version_info())
     return capabilities
コード例 #17
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def make_hello(self):
     capabilities = UIXpraClient.make_hello(self)
     capabilities["named_cursors"] = len(cursor_types)>0
     #we need the bindings to support initiate-moveresize (posix only for now):
     from xpra.client.gtk_base.gtk_client_window_base import HAS_X11_BINDINGS
     capabilities["window.initiate-moveresize"] = HAS_X11_BINDINGS
     capabilities.update(get_gtk_version_info())
     return capabilities
コード例 #18
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def __init__(self):
     GObjectXpraClient.__init__(self)
     UIXpraClient.__init__(self)
     self.session_info = None
     self.bug_report = None
     self.start_new_command = None
     #opengl bits:
     self.client_supports_opengl = False
     self.opengl_enabled = False
     self.opengl_props = {}
     self.gl_max_viewport_dims = 0, 0
     self.gl_texture_size_limit = 0
     self._cursors = weakref.WeakKeyDictionary()
     #frame request hidden window:
     self.frame_request_window = None
     #group leader bits:
     self._ref_to_group_leader = {}
     self._group_leader_wids = {}
     self._set_window_menu = get_menu_support_function()
     self.connect("scaling-changed", self.reset_windows_cursors)
コード例 #19
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def __init__(self):
     GObjectXpraClient.__init__(self)
     UIXpraClient.__init__(self)
     self.session_info = None
     self.bug_report = None
     self.start_new_command = None
     #opengl bits:
     self.client_supports_opengl = False
     self.opengl_enabled = False
     self.opengl_props = {}
     self.gl_max_viewport_dims = 0, 0
     self.gl_texture_size_limit = 0
     self._cursors = weakref.WeakKeyDictionary()
     #frame request hidden window:
     self.frame_request_window = None
     #group leader bits:
     self._ref_to_group_leader = {}
     self._group_leader_wids = {}
     self._set_window_menu = get_menu_support_function()
     self.connect("scaling-changed", self.reset_windows_cursors)
コード例 #20
0
 def make_hello(self):
     capabilities = UIXpraClient.make_hello(self)
     capabilities["named_cursors"] = len(cursor_types) > 0
     capabilities.update(get_gtk_version_info())
     #tell the server which icons GTK can use
     #so it knows when it should supply one as fallback
     it = icon_theme_get_default()
     #this would add our bundled icon directory
     #to the search path, but I don't think we have
     #any extra icons that matter in there:
     #from xpra.platform.paths import get_icon_dir
     #d = get_icon_dir()
     #if d not in it.get_search_path():
     #    it.append_search_path(d)
     #    it.rescan_if_needed()
     log("default icon theme: %s", it)
     log("icon search path: %s", it.get_search_path())
     log("contexts: %s", it.list_contexts())
     icons = []
     for context in it.list_contexts():
         icons += it.list_icons(context)
     log("icons: %s", icons)
     capabilities["theme.default.icons"] = list(set(icons))
     if METADATA_SUPPORTED:
         ms = [x.strip() for x in METADATA_SUPPORTED.split(",")]
     else:
         #this is currently unused, and slightly redundant because of metadata.supported below:
         capabilities["window.states"] = [
             "fullscreen", "maximized", "sticky", "above", "below",
             "shaded", "iconified", "skip-taskbar", "skip-pager"
         ]
         ms = list(DEFAULT_METADATA_SUPPORTED)
         #added in 0.15:
         ms += ["command", "workspace", "above", "below", "sticky"]
     if os.name == "posix":
         #this is only really supported on X11, but posix is easier to check for..
         #"strut" and maybe even "fullscreen-monitors" could also be supported on other platforms I guess
         ms += [
             "shaded", "bypass-compositor", "strut", "fullscreen-monitors"
         ]
     log("metadata.supported: %s", ms)
     capabilities["metadata.supported"] = ms
     #we need the bindings to support initiate-moveresize (posix only for now):
     from xpra.client.gtk_base.gtk_client_window_base import HAS_X11_BINDINGS
     capabilities["window.initiate-moveresize"] = HAS_X11_BINDINGS
     #window icon bits
     capabilities[
         "encoding.icons.greedy"] = True  #we don't set a default window icon any more
     capabilities["encoding.icons.size"] = 64, 64  #size we want
     capabilities["encoding.icons.max_size"] = 128, 128  #limit
     from xpra.client.window_backing_base import DELTA_BUCKETS
     capabilities["encoding.delta_buckets"] = DELTA_BUCKETS
     return capabilities
コード例 #21
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def make_hello(self):
     capabilities = UIXpraClient.make_hello(self)
     capabilities["named_cursors"] = len(cursor_types)>0
     capabilities.update(get_gtk_version_info())
     #tell the server which icons GTK can use
     #so it knows when it should supply one as fallback
     it = icon_theme_get_default()
     #this would add our bundled icon directory
     #to the search path, but I don't think we have
     #any extra icons that matter in there:
     #from xpra.platform.paths import get_icon_dir
     #d = get_icon_dir()
     #if d not in it.get_search_path():
     #    it.append_search_path(d)
     #    it.rescan_if_needed()
     log("default icon theme: %s", it)
     log("icon search path: %s", it.get_search_path())
     log("contexts: %s", it.list_contexts())
     icons = []
     for context in it.list_contexts():
         icons += it.list_icons(context)
     log("icons: %s", icons)
     capabilities["theme.default.icons"] = list(set(icons))
     if METADATA_SUPPORTED:
         ms = [x.strip() for x in METADATA_SUPPORTED.split(",")]
     else:
         #this is currently unused, and slightly redundant because of metadata.supported below:
         capabilities["window.states"] = ["fullscreen", "maximized", "sticky", "above", "below", "shaded", "iconified", "skip-taskbar", "skip-pager"]
         ms = list(DEFAULT_METADATA_SUPPORTED)
         #added in 0.15:
         ms += ["command", "workspace", "above", "below", "sticky"]
     if os.name=="posix":
         #this is only really supported on X11, but posix is easier to check for..
         #"strut" and maybe even "fullscreen-monitors" could also be supported on other platforms I guess
         ms += ["shaded", "bypass-compositor", "strut", "fullscreen-monitors"]
     log("metadata.supported: %s", ms)
     capabilities["metadata.supported"] = ms
     #we need the bindings to support initiate-moveresize (posix only for now):
     from xpra.client.gtk_base.gtk_client_window_base import HAS_X11_BINDINGS
     capabilities["window.initiate-moveresize"] = HAS_X11_BINDINGS
     #window icon bits
     capabilities["encoding.icons.greedy"] = True            #we don't set a default window icon any more
     capabilities["encoding.icons.size"] = 64, 64            #size we want
     capabilities["encoding.icons.max_size"] = 128, 128      #limit
     from xpra.client.window_backing_base import DELTA_BUCKETS
     capabilities["encoding.delta_buckets"] = DELTA_BUCKETS
     return capabilities
コード例 #22
0
ファイル: gtk_client_base.py プロジェクト: Brainiarc7/xpra
 def init(self, opts):
     GObjectXpraClient.init(self, opts)
     UIXpraClient.init(self, opts)
コード例 #23
0
ファイル: gtk_client_base.py プロジェクト: Brainiarc7/xpra
 def make_hello(self):
     capabilities = UIXpraClient.make_hello(self)
     capabilities["named_cursors"] = len(cursor_names)>0
     add_gtk_version_info(capabilities, gtk, "", True)
     return capabilities
コード例 #24
0
ファイル: gtk_client_base.py プロジェクト: Brainiarc7/xpra
 def __init__(self):
     GObjectXpraClient.__init__(self)
     UIXpraClient.__init__(self)
     self.session_info = None
コード例 #25
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def make_hello(self, challenge_response=None):
     capabilities = UIXpraClient.make_hello(self, challenge_response)
     capabilities["named_cursors"] = len(cursor_names)>0
     add_gtk_version_info(capabilities, gtk, "", True)
     return capabilities
コード例 #26
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def init(self, opts):
     GObjectXpraClient.init(self, opts)
     UIXpraClient.init(self, opts)
コード例 #27
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def make_hello(self):
     capabilities = UIXpraClient.make_hello(self)
     capabilities["named_cursors"] = len(cursor_names) > 0
     capabilities.update(get_gtk_version_info())
     return capabilities
コード例 #28
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def cook_metadata(self, new_window, metadata):
     metadata = UIXpraClient.cook_metadata(self, new_window, metadata)
     #ensures we will call set_window_menu for this window when we create it:
     if new_window and b"menu" not in metadata and self._set_window_menu:
         metadata[b"menu"] = {}
     return metadata
コード例 #29
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def init_ui(self, opts, extra_args=[]):
     UIXpraClient.init_ui(self, opts, extra_args)
     icon = self.get_pixbuf("xpra.png")
     if icon:
         window_set_default_icon(icon)
コード例 #30
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def __init__(self):
     GObjectXpraClient.__init__(self)
     UIXpraClient.__init__(self)
     self.session_info = None
     self.bug_report = None
コード例 #31
0
ファイル: client.py プロジェクト: rudresh2319/Xpra
 def make_hello(self):
     capabilities = UIXpraClient.make_hello(self)
     capabilities["named_cursors"] = False
     #add_qt_version_info(capabilities, QtGui)
     return capabilities
コード例 #32
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def make_hello(self):
     capabilities = UIXpraClient.make_hello(self)
     capabilities["named_cursors"] = len(cursor_names)>0
     capabilities.update(get_gtk_version_info())
     return capabilities
コード例 #33
0
ファイル: client.py プロジェクト: rudresh2319/Xpra
 def __init__(self):
     s = getQtScheduler()
     self.idle_add = s.idle_add
     self.timeout_add = s.timeout_add
     self.QtInit()
     UIXpraClient.__init__(self)
コード例 #34
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def init_ui(self, opts, extra_args=[]):
     UIXpraClient.init_ui(self, opts, extra_args)
     icon = self.get_pixbuf("xpra.png")
     if icon:
         window_set_default_icon(icon)
コード例 #35
0
 def make_hello(self):
     capabilities = UIXpraClient.make_hello(self)
     capabilities["named_cursors"] = len(cursor_names) > 0
     add_gtk_version_info(capabilities, gtk, "", True)
     return capabilities
コード例 #36
0
ファイル: gtk_client_base.py プロジェクト: Brainiarc7/xpra
 def run(self):
     UIXpraClient.run(self)
     gtk_main_quit_on_fatal_exceptions_enable()
     self.gtk_main()
     log("GTKXpraClient.run_main_loop() main loop ended, returning exit_code=%s", self.exit_code)
     return  self.exit_code
コード例 #37
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def make_hello(self, challenge_response=None):
     capabilities = UIXpraClient.make_hello(self, challenge_response)
     capabilities["named_cursors"] = len(cursor_names) > 0
     add_gtk_version_info(capabilities, gtk, "", True)
     return capabilities
コード例 #38
0
ファイル: gtk_client_base.py プロジェクト: Brainiarc7/xpra
 def cleanup(self):
     if self.session_info:
         self.session_info.destroy()
     UIXpraClient.cleanup(self)
コード例 #39
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def __init__(self):
     GObjectXpraClient.__init__(self)
     UIXpraClient.__init__(self)
コード例 #40
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def get_system_tray_classes(self):
     return self._add_statusicon_tray(
         UIXpraClient.get_system_tray_classes(self))
コード例 #41
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def cleanup(self):
     if self.session_info:
         self.session_info.destroy()
     UIXpraClient.cleanup(self)
コード例 #42
0
ファイル: gtk_client_base.py プロジェクト: rudresh2319/Xpra
 def make_hello(self):
     capabilities = UIXpraClient.make_hello(self)
     capabilities["named_cursors"] = len(cursor_types) > 0
     capabilities.update(flatten_dict(get_gtk_version_info()))
     #tell the server which icons GTK can use
     #so it knows when it should supply one as fallback
     it = icon_theme_get_default()
     #this would add our bundled icon directory
     #to the search path, but I don't think we have
     #any extra icons that matter in there:
     #from xpra.platform.paths import get_icon_dir
     #d = get_icon_dir()
     #if d not in it.get_search_path():
     #    it.append_search_path(d)
     #    it.rescan_if_needed()
     log("default icon theme: %s", it)
     log("icon search path: %s", it.get_search_path())
     log("contexts: %s", it.list_contexts())
     icons = []
     for context in it.list_contexts():
         icons += it.list_icons(context)
     log("icons: %s", icons)
     capabilities["theme.default.icons"] = list(set(icons))
     if METADATA_SUPPORTED:
         ms = [x.strip() for x in METADATA_SUPPORTED.split(",")]
     else:
         #this is currently unused, and slightly redundant because of metadata.supported below:
         capabilities["window.states"] = [
             "fullscreen", "maximized", "sticky", "above", "below",
             "shaded", "iconified", "skip-taskbar", "skip-pager"
         ]
         ms = list(DEFAULT_METADATA_SUPPORTED)
         #added in 0.15:
         ms += [
             "command", "workspace", "above", "below", "sticky",
             "set-initial-position"
         ]  #0.17
     if os.name == "posix":
         #this is only really supported on X11, but posix is easier to check for..
         #"strut" and maybe even "fullscreen-monitors" could also be supported on other platforms I guess
         ms += [
             "shaded", "bypass-compositor", "strut", "fullscreen-monitors"
         ]
     if HAS_X11_BINDINGS:
         ms += ["shape"]
     if self._set_window_menu:
         ms += ["menu"]
     #figure out if we can handle the "global menu" stuff:
     if os.name == "posix" and not sys.platform.startswith("darwin"):
         try:
             from xpra.dbus.helper import DBusHelper
             assert DBusHelper
         except:
             pass
     log("metadata.supported: %s", ms)
     capabilities["metadata.supported"] = ms
     #we need the bindings to support initiate-moveresize (posix only for now):
     updict(
         capabilities, "window", {
             "initiate-moveresize": HAS_X11_BINDINGS,
             "configure.pointer": True,
             "frame_sizes": self.get_window_frame_sizes()
         })
     from xpra.client.window_backing_base import DELTA_BUCKETS
     updict(
         capabilities,
         "encoding",
         {
             "icons.greedy":
             True,  #we don't set a default window icon any more
             "icons.size": (64, 64),  #size we want
             "icons.max_size": (128, 128),  #limit
             "delta_buckets": DELTA_BUCKETS,
         })
     return capabilities
コード例 #43
0
ファイル: gtk_client_base.py プロジェクト: Brainiarc7/xpra
 def get_system_tray_classes(self):
     return self._add_statusicon_tray(UIXpraClient.get_system_tray_classes(self))
コード例 #44
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def __init__(self):
     GObjectXpraClient.__init__(self)
     UIXpraClient.__init__(self)
コード例 #45
0
ファイル: gtk_client_base.py プロジェクト: ljmljz/xpra
 def make_hello(self):
     capabilities = UIXpraClient.make_hello(self)
     capabilities["named_cursors"] = len(cursor_types)>0
     capabilities.update(flatten_dict(get_gtk_version_info()))
     #tell the server which icons GTK can use
     #so it knows when it should supply one as fallback
     it = icon_theme_get_default()
     #this would add our bundled icon directory
     #to the search path, but I don't think we have
     #any extra icons that matter in there:
     #from xpra.platform.paths import get_icon_dir
     #d = get_icon_dir()
     #if d not in it.get_search_path():
     #    it.append_search_path(d)
     #    it.rescan_if_needed()
     log("default icon theme: %s", it)
     log("icon search path: %s", it.get_search_path())
     log("contexts: %s", it.list_contexts())
     icons = []
     for context in it.list_contexts():
         icons += it.list_icons(context)
     log("icons: %s", icons)
     capabilities["theme.default.icons"] = list(set(icons))
     if METADATA_SUPPORTED:
         ms = [x.strip() for x in METADATA_SUPPORTED.split(",")]
     else:
         #this is currently unused, and slightly redundant because of metadata.supported below:
         capabilities["window.states"] = ["fullscreen", "maximized", "sticky", "above", "below", "shaded", "iconified", "skip-taskbar", "skip-pager"]
         ms = list(DEFAULT_METADATA_SUPPORTED)
         #added in 0.15:
         ms += ["command", "workspace", "above", "below", "sticky",
                "set-initial-position"]  #0.17
     if os.name=="posix":
         #this is only really supported on X11, but posix is easier to check for..
         #"strut" and maybe even "fullscreen-monitors" could also be supported on other platforms I guess
         ms += ["shaded", "bypass-compositor", "strut", "fullscreen-monitors"]
     if HAS_X11_BINDINGS:
         ms += ["shape"]
     if self._set_window_menu:
         ms += ["menu"]
     #figure out if we can handle the "global menu" stuff:
     if os.name=="posix" and not sys.platform.startswith("darwin"):
         try:
             from xpra.dbus.helper import DBusHelper
             assert DBusHelper
         except:
             pass
     log("metadata.supported: %s", ms)
     capabilities["metadata.supported"] = ms
     #we need the bindings to support initiate-moveresize (posix only for now):
     updict(capabilities, "window", {
            "initiate-moveresize"    : HAS_X11_BINDINGS,
            "configure.pointer"      : True,
            "frame_sizes"            : self.get_window_frame_sizes()
            })
     from xpra.client.window_backing_base import DELTA_BUCKETS
     updict(capabilities, "encoding", {
                 "icons.greedy"      : True,         #we don't set a default window icon any more
                 "icons.size"        : (64, 64),     #size we want
                 "icons.max_size"    : (128, 128),   #limit
                 "delta_buckets"     : DELTA_BUCKETS,
                 })
     return capabilities
コード例 #46
0
ファイル: gtk_client_base.py プロジェクト: svn2github/Xpra
 def cook_metadata(self, new_window, metadata):
     metadata = UIXpraClient.cook_metadata(self, new_window, metadata)
     #ensures we will call set_window_menu for this window when we create it:
     if new_window and b"menu" not in metadata and self._set_window_menu:
         metadata[b"menu"] = {}
     return metadata
コード例 #47
0
ファイル: client.py プロジェクト: rudresh2319/Xpra
 def make_hello(self, challenge_response=None):
     capabilities = UIXpraClient.make_hello(self, challenge_response)
     capabilities["named_cursors"] = False
     #add_qt_version_info(capabilities, QtGui)
     return capabilities