diff options
author | Pierre Ossman <ossman@cendio.se> | 2009-03-20 12:59:05 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2009-03-20 12:59:05 +0000 |
commit | c5e25601d923169c30b656246ac503451f04e638 (patch) | |
tree | 81b57e582d71eb826f0304047b02d16600a09612 /common/rfb/VNCSConnectionST.cxx | |
parent | 2a8017db1007977e5353027a9b885495fa7d46d6 (diff) | |
download | tigervnc-c5e25601d923169c30b656246ac503451f04e638.tar.gz tigervnc-c5e25601d923169c30b656246ac503451f04e638.zip |
Minimal server side implementation of the extended desktop size protocol.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3698 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/VNCSConnectionST.cxx')
-rw-r--r-- | common/rfb/VNCSConnectionST.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index e021aa6f..3b4448b4 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -1,4 +1,5 @@ /* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. + * Copyright 2009 Pierre Ossman for Cendio AB * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,6 +20,7 @@ #include <rfb/VNCSConnectionST.h> #include <rfb/LogWriter.h> #include <rfb/secTypes.h> +#include <rfb/screenTypes.h> #include <rfb/ServerCore.h> #include <rfb/ComparingUpdateTracker.h> #include <rfb/KeyRemapper.h> @@ -168,7 +170,8 @@ void VNCSConnectionST::pixelBufferChange() cp.width = server->pb->width(); cp.height = server->pb->height(); if (state() == RFBSTATE_NORMAL) { - if (!writer()->writeSetDesktopSize()) { + if (!writer()->writeSetDesktopSize() && + !writer()->writeExtendedDesktopSize()) { close("Client does not support desktop resize"); return; } @@ -490,9 +493,18 @@ void VNCSConnectionST::framebufferUpdateRequest(const Rect& r,bool incremental) // Non-incremental update - treat as if area requested has changed updates.add_changed(reqRgn); server->comparer->add_changed(reqRgn); + // And update the clients view of screen layout + writer()->writeSetDesktopSize(); + writer()->writeExtendedDesktopSize(); } } +void VNCSConnectionST::setDesktopSize(int fb_width, int fb_height) +{ + vlog.info("Rejecting client request to change desktop size"); + writer()->writeExtendedDesktopSize(resultProhibited); +} + void VNCSConnectionST::setInitialColourMap() { setColourMapEntries(0, 0); |