diff options
author | Guido Berhoerster <gber@opensuse.org> | 2011-10-26 12:16:06 -0400 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2011-10-26 12:16:06 -0400 |
commit | 7e841d936428ea23e2a15090a17491b9b28d1ff1 (patch) | |
tree | 2de7adc121f65afd5a2980486a0e474f0e5368d8 | |
parent | d404fdfe03760ee516f4a549a0a9460e2822314a (diff) | |
download | lightdm-git-7e841d936428ea23e2a15090a17491b9b28d1ff1.tar.gz |
Connect up Xvnc geometry configuration
-rw-r--r-- | src/seat-xvnc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/seat-xvnc.c b/src/seat-xvnc.c index 5b95aa82..472d0822 100644 --- a/src/seat-xvnc.c +++ b/src/seat-xvnc.c @@ -39,6 +39,23 @@ seat_xvnc_create_display_server (Seat *seat) xserver = xserver_xvnc_new (); xserver_xvnc_set_socket (xserver, g_socket_get_fd (SEAT_XVNC (seat)->priv->connection)); + if (config_has_key (config_get_instance (), "VNCServer", "width") && + config_has_key (config_get_instance (), "VNCServer", "height")) + { + gint width, height; + width = config_get_integer (config_get_instance (), "VNCServer", "width"); + height = config_get_integer (config_get_instance (), "VNCServer", "height"); + if (height > 0 && width > 0) + xserver_xvnc_set_geometry (xserver, width, height); + } + if (config_has_key (config_get_instance (), "VNCServer", "depth")) + { + gint depth; + depth = config_get_integer (config_get_instance (), "VNCServer", "depth"); + if (depth == 8 || depth == 16 || depth == 24 || depth == 32) + xserver_xvnc_set_depth (xserver, depth); + } + return DISPLAY_SERVER (xserver); } |