From c5e25601d923169c30b656246ac503451f04e638 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 20 Mar 2009 12:59:05 +0000 Subject: 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 --- common/rfb/VNCSConnectionST.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'common/rfb/VNCSConnectionST.cxx') 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 #include #include +#include #include #include #include @@ -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); -- cgit v1.2.3