示例#1
0
 def init(self, opts):
     GTKServerBase.init(self, opts)
     ShadowServerBase.init(self, opts)
     self.tray = opts.tray
     self.tray_icon = opts.tray_icon
     if self.tray:
         self.setup_tray()
示例#2
0
 def __init__(self):
     #TODO: root should be a wrapper for the win32 system metrics bits?
     #(or even not bother passing root to ShadowServerBase?
     import gtk.gdk
     ShadowServerBase.__init__(self, gtk.gdk.get_default_root_window())
     GTKServerBase.__init__(self)
     self.keycodes = {}
示例#3
0
 def cleanup(self):
     self.cleanup_tray()
     #root window models aren't like regular window models
     #(which get cleaned up using the unmanage signal)
     for model in self._id_to_window.values():
         model.cleanup()
     ShadowServerBase.cleanup(self)
     GTKServerBase.cleanup(self)
示例#4
0
 def __init__(self):
     ShadowServerBase.__init__(self, gtk.gdk.get_default_root_window())
     GTKServerBase.__init__(self)
     #for managing the systray
     self.tray_menu = None
     self.tray_menu_shown = False
     self.tray_widget = None
     self.tray = False
     self.tray_icon = None
示例#5
0
 def __init__(self):
     from xpra.gtk_common.gtk_util import get_default_root_window
     ShadowServerBase.__init__(self, get_default_root_window())
     GTKServerBase.__init__(self)
     #for managing the systray
     self.tray_menu = None
     self.tray_menu_shown = False
     self.tray_widget = None
     self.tray = False
     self.tray_icon = None
示例#6
0
 def __init__(self):
     #sanity check:
     image = CG.CGWindowListCreateImage(CG.CGRectInfinite,
                 CG.kCGWindowListOptionOnScreenOnly,
                 CG.kCGNullWindowID,
                 CG.kCGWindowImageDefault)
     if image is None:
         raise Exception("cannot grab test screenshot - maybe you need to run this command whilst logged in via the UI")
     ShadowServerBase.__init__(self, gtk.gdk.get_default_root_window())
     GTKServerBase.__init__(self)
示例#7
0
 def __init__(self):
     from xpra.gtk_common.gtk_util import get_default_root_window
     ShadowServerBase.__init__(self, get_default_root_window())
     GTKServerBase.__init__(self)
     self.session_type = "shadow"
     self.pointer_position_timer = None
     #for managing the systray
     self.tray_menu = None
     self.tray_menu_shown = False
     self.tray_widget = None
     self.tray = False
     self.tray_icon = None
示例#8
0
 def __init__(self):
     #sanity check:
     image = CG.CGWindowListCreateImage(CG.CGRectInfinite,
                                        CG.kCGWindowListOptionOnScreenOnly,
                                        CG.kCGNullWindowID,
                                        CG.kCGWindowImageDefault)
     if image is None:
         raise Exception(
             "cannot grab test screenshot - maybe you need to run this command whilst logged in via the UI"
         )
     ShadowServerBase.__init__(self, gtk.gdk.get_default_root_window())
     GTKServerBase.__init__(self)
示例#9
0
 def get_info(self, proto, *_args):
     info = X11ServerCore.get_info(self, proto)
     merge_dicts(info, ShadowServerBase.get_info(self, proto))
     info.setdefault("features", {})["shadow"] = True
     info.setdefault(
         "server", {})["type"] = "Python/gtk%i/x11-shadow" % (2 + is_gtk3())
     return info
示例#10
0
 def get_notifier_classes(self):
     ncs = ShadowServerBase.get_notifier_classes(self)
     try:
         from xpra.gtk_common.gtk_notifier import GTK_Notifier
         ncs.append(GTK_Notifier)
     except Exception as e:
         notifylog("get_notifier_classes()", exc_info=True)
         notifylog.warn("Warning: cannot load GTK notifier:")
         notifylog.warn(" %s", e)
     return ncs
示例#11
0
 def cleanup(self):
     self.cleanup_tray()
     ShadowServerBase.cleanup(self)
     GTKServerBase.cleanup(self)
示例#12
0
 def refresh(self):
     v = ShadowServerBase.refresh(self)
     if v and SEAMLESS:
         self.root_window_model.refresh_shape()
     log("refresh()=%s", v)
     return v
示例#13
0
 def cleanup(self):
     self.cleanup_tray()
     ShadowServerBase.cleanup(self)
     GTKServerBase.cleanup(self)  #@UndefinedVariable
示例#14
0
 def cleanup(self):
     self.cleanup_tray()
     self.stop_poll_pointer_position()
     GTKServerBase.cleanup(self)
     ShadowServerBase.cleanup(self)
示例#15
0
 def make_hello(self, source):
     caps = ShadowServerBase.make_hello(self, source)
     caps.update(GTKServerBase.make_hello(self, source))
     if source.wants_features:
         caps["screen_sizes"] = get_screen_sizes()
     return caps
示例#16
0
 def __init__(self):
     ShadowServerBase.__init__(self, get_default_root_window())
     X11ServerBase.__init__(self, False)
示例#17
0
 def stop_refresh(self):
     self.stop_poll_pointer_position()
     ShadowServerBase.stop_refresh(self)
示例#18
0
 def make_hello(self, source):
     capabilities = X11ServerBase.make_hello(self, source)
     capabilities.update(ShadowServerBase.make_hello(self, source))
     capabilities["server_type"] = "Python/gtk2/x11-shadow"
     return capabilities
示例#19
0
 def __init__(self):
     ShadowServerBase.__init__(self, get_default_root_window())
     X11ServerBase.__init__(self, False)
示例#20
0
 def make_hello(self, source):
     capabilities = X11ServerBase.make_hello(self, source)
     capabilities.update(ShadowServerBase.make_hello(self, source))
     capabilities["server_type"] = "Python/gtk2/x11-shadow"
     return capabilities