Esempio n. 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()
Esempio n. 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 = {}
Esempio n. 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)
Esempio n. 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
Esempio n. 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
Esempio n. 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)
Esempio n. 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
Esempio n. 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)
Esempio n. 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
Esempio n. 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
Esempio n. 11
0
 def cleanup(self):
     self.cleanup_tray()
     ShadowServerBase.cleanup(self)
     GTKServerBase.cleanup(self)
Esempio n. 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
Esempio n. 13
0
 def cleanup(self):
     self.cleanup_tray()
     ShadowServerBase.cleanup(self)
     GTKServerBase.cleanup(self)  #@UndefinedVariable
Esempio n. 14
0
 def cleanup(self):
     self.cleanup_tray()
     self.stop_poll_pointer_position()
     GTKServerBase.cleanup(self)
     ShadowServerBase.cleanup(self)
Esempio n. 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
Esempio n. 16
0
 def __init__(self):
     ShadowServerBase.__init__(self, get_default_root_window())
     X11ServerBase.__init__(self, False)
Esempio n. 17
0
 def stop_refresh(self):
     self.stop_poll_pointer_position()
     ShadowServerBase.stop_refresh(self)
Esempio n. 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
Esempio n. 19
0
 def __init__(self):
     ShadowServerBase.__init__(self, get_default_root_window())
     X11ServerBase.__init__(self, False)
Esempio n. 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