예제 #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