diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2011-10-26 12:16:42 -0400 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2011-10-26 12:16:42 -0400 |
commit | 5f20086b5c530578a363d362f578cd0b9c2113ab (patch) | |
tree | d337ff2ca1c5da0230d660fdf089a2a253956a22 /src/seat-xvnc.c | |
parent | 06e6ff235c3811871975f8b9a04f59cd4a5d8dd2 (diff) | |
download | lightdm-git-5f20086b5c530578a363d362f578cd0b9c2113ab.tar.gz |
Connect up Xvnc geometry configuration
Diffstat (limited to 'src/seat-xvnc.c')
-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); } |