Skip to content

Commit

Permalink
#899: systray support for osx shadow servers
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@12246 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 27, 2016
1 parent 33cd574 commit df18cee
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/xpra/platform/darwin/shadow_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@

from xpra.server.gtk_server_base import GTKServerBase
from xpra.server.shadow.root_window_model import RootWindowModel
from xpra.server.shadow.shadow_server_base import ShadowServerBase
from xpra.server.shadow.gtk_shadow_server_base import GTKShadowServerBase
from xpra.platform.darwin.gui import get_CG_imagewrapper, take_screenshot

import gtk.gdk
import Quartz.CoreGraphics as CG #@UnresolvedImport

ALPHA = {
Expand All @@ -36,7 +35,7 @@ def take_screenshot(self):
return take_screenshot()


class ShadowServer(ShadowServerBase, GTKServerBase):
class ShadowServer(GTKShadowServerBase):

def __init__(self):
#sanity check:
Expand All @@ -48,13 +47,16 @@ def __init__(self):
from xpra.scripts.config import InitExit
log("cannot grab test screenshot - maybe you need to run this command whilst logged in via the UI")
raise InitExit(1, "cannot grab pixels from the screen, make sure this command is launched from a GUI session")
ShadowServerBase.__init__(self, gtk.gdk.get_default_root_window())
GTKServerBase.__init__(self)
GTKShadowServerBase.__init__(self)

def init(self, opts):
GTKServerBase.init(self, opts)
GTKShadowServerBase.init(self, opts)
self.keycodes = {}

def make_tray_widget(self):
from xpra.client.gtk_base.statusicon_tray import GTKStatusIconTray
return GTKStatusIconTray(self, self.tray, "Xpra Shadow Server", None, None, self.tray_click_callback, mouseover_cb=None, exit_cb=self.tray_exit_callback)

def makeRootWindowModel(self):
return OSXRootWindowModel(self.root)

Expand Down

0 comments on commit df18cee

Please sign in to comment.