From 76a090196406fbd8a5a3bda1d90fd6e9699b2799 Mon Sep 17 00:00:00 2001 From: Laxmikant Rashinkar Date: Sun, 23 Feb 2014 18:03:31 -0800 Subject: [PATCH] o --enable-load_pulse_modules changed to --enable-loadpulsemodules o color entries in xrdp.ini file are now specfied using RGB format only o login screen now works with pixel depth of 8, 15, 16 and 24 bits --- configure.ac | 8 ++++---- xrdp/xrdp.h | 2 +- xrdp/xrdp.ini | 6 +++--- xrdp/xrdp_login_wnd.c | 9 +++++---- xrdp/xrdp_wm.c | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 07d61cd2..d4807bcc 100644 --- a/configure.ac +++ b/configure.ac @@ -54,10 +54,10 @@ AC_ARG_ENABLE(fuse, AS_HELP_STRING([--enable-fuse], [fuse=true], [fuse=false]) AM_CONDITIONAL(XRDP_FUSE, [test x$fuse = xtrue]) -AC_ARG_ENABLE(load_pulse_modules, AS_HELP_STRING([--enable-load_pulse_modules], +AC_ARG_ENABLE(loadpulsemodules, AS_HELP_STRING([--enable-loadpulsemodules], [Build code to load pulse audio modules (default: no)]), - [load_pulse_modules=true], [load_pulse_modules=false]) -AM_CONDITIONAL(XRDP_LOAD_PULSE_MODULES, [test x$load_pulse_modules = xtrue]) + [loadpulsemodules=true], [loadpulsemodules=false]) +AM_CONDITIONAL(XRDP_LOAD_PULSE_MODULES, [test x$loadpulsemodules = xtrue]) AC_ARG_ENABLE(xrdpvr, AS_HELP_STRING([--enable-xrdpvr], [Build xrdpvr module (default: no)]), @@ -114,7 +114,7 @@ then fi # checking for libpulse -if ! test -z "$enable_load_pulse_modules" +if ! test -z "$enable_loadpulsemodules" then AC_CHECK_HEADER([pulse/util.h], [], [AC_MSG_ERROR([please install libpulse-dev or libpulse-devel])]) diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h index e04dea5f..d0b970aa 100644 --- a/xrdp/xrdp.h +++ b/xrdp/xrdp.h @@ -352,7 +352,7 @@ get_keymaps(int keylayout, struct xrdp_keymap* keymap); int APP_CC xrdp_login_wnd_create(struct xrdp_wm* self); int APP_CC -load_xrdp_config(struct xrdp_config *config); +load_xrdp_config(struct xrdp_config *config, int bpp); /* xrdp_bitmap_compress.c */ int APP_CC diff --git a/xrdp/xrdp.ini b/xrdp/xrdp.ini index 771bc73b..70c917e1 100644 --- a/xrdp/xrdp.ini +++ b/xrdp/xrdp.ini @@ -54,14 +54,14 @@ allow_multimon=true # configure login screen # -# top level window background color in BGR format (not RGB) -ls_top_window_bg_color=bf9c00 +# top level window background color in RGB format +ls_top_window_bg_color=009cb5 # width and height of login screen ls_width=350 ls_height=430 -# login screen background color in BGR format (not RGB) +# login screen background color in RGB format ls_bg_color=dedede # logo diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c index bd63b0ec..2e53fca5 100644 --- a/xrdp/xrdp_login_wnd.c +++ b/xrdp/xrdp_login_wnd.c @@ -643,7 +643,7 @@ xrdp_login_wnd_create(struct xrdp_wm *self) * @return 0 on success, -1 on failure *****************************************************************************/ int APP_CC -load_xrdp_config(struct xrdp_config *config) +load_xrdp_config(struct xrdp_config *config, int bpp) { struct xrdp_cfg_globals *globals; @@ -663,7 +663,8 @@ load_xrdp_config(struct xrdp_config *config) /* set default values incase we can't get them from xrdp.ini file */ globals->ini_version = 1; - globals->ls_top_window_bg_color = xrdp_wm_htoi("bf9c00"); + globals->ls_top_window_bg_color = HCOLOR(bpp, xrdp_wm_htoi("009cb5")); + globals->ls_bg_color = HCOLOR(bpp, xrdp_wm_htoi("dedede")); globals->ls_width = 350; globals->ls_height = 350; globals->ls_bg_color = 0xdedede; @@ -814,7 +815,7 @@ load_xrdp_config(struct xrdp_config *config) /* login screen values */ else if (g_strncmp(n, "ls_top_window_bg_color", 64) == 0) - globals->ls_top_window_bg_color = xrdp_wm_htoi(v); + globals->ls_top_window_bg_color = HCOLOR(bpp, xrdp_wm_htoi(v)); else if (g_strncmp(n, "ls_width", 64) == 0) globals->ls_width = g_atoi(v); @@ -823,7 +824,7 @@ load_xrdp_config(struct xrdp_config *config) globals->ls_height = g_atoi(v); else if (g_strncmp(n, "ls_bg_color", 64) == 0) - globals->ls_bg_color = xrdp_wm_htoi(v); + globals->ls_bg_color = HCOLOR(bpp, xrdp_wm_htoi(v)); else if (g_strncmp(n, "ls_logo_filename", 255) == 0) { diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index e0657fac..ffc6d3a2 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -544,7 +544,7 @@ xrdp_wm_init(struct xrdp_wm *self) char cfg_file[256]; char autorun_name[256]; - load_xrdp_config(self->xrdp_config); + load_xrdp_config(self->xrdp_config, self->screen->bpp); xrdp_wm_load_static_colors_plus(self, autorun_name); xrdp_wm_load_static_pointers(self);