diff --git a/src/xpra/server/server_core.py b/src/xpra/server/server_core.py index ae57ebe469..59c2c3c51c 100644 --- a/src/xpra/server/server_core.py +++ b/src/xpra/server/server_core.py @@ -476,10 +476,17 @@ def print_run_info(self): log.info(" uid=%i, gid=%i", uid, gid) log.info(" running with pid %s%s", os.getpid(), osinfo) + def get_display_bit_depth(self): + return 0 + def print_screen_info(self): display = os.environ.get("DISPLAY") if display and display.startswith(":"): - log.info(" connected to X11 display %s", display) + extra = "" + bit_depth = self.get_display_bit_depth() + if bit_depth: + extra = " with %i bit colors" % bit_depth + log.info(" connected to X11 display %s%s", display, extra) def server_is_ready(self): diff --git a/src/xpra/x11/x11_server_base.py b/src/xpra/x11/x11_server_base.py index 399378a90e..c177d193b6 100644 --- a/src/xpra/x11/x11_server_base.py +++ b/src/xpra/x11/x11_server_base.py @@ -27,6 +27,8 @@ X11Keyboard = X11KeyboardBindings() from xpra.x11.bindings.core_bindings import X11CoreBindings #@UnresolvedImport X11Core = X11CoreBindings() +from xpra.x11.bindings.window_bindings import X11WindowBindings +X11Window = X11WindowBindings() from xpra.gtk_common.error import XError, xswallow, xsync, trap from xpra.gtk_common.gtk_util import get_xwindow from xpra.server.server_uuid import save_uuid, get_uuid @@ -140,6 +142,11 @@ def get_default_cursor(): trap.swallow_synced(get_default_cursor) X11Keyboard.selectCursorChange(True) + def get_display_bit_depth(self): + with xswallow: + return X11Window.get_depth(X11Window.getDefaultRootWindow()) + return 0 + def query_opengl(self): self.opengl_props = {} try: