Browse Source

Move the SetDesktopName parser into CMsgReaderV3 to keep with the separation

of old and new features.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3696 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v0.0.90
Pierre Ossman 15 years ago
parent
commit
e49a7bf7aa
4 changed files with 16 additions and 15 deletions
  1. 0
    13
      common/rfb/CMsgReader.cxx
  2. 0
    1
      common/rfb/CMsgReader.h
  3. 14
    0
      common/rfb/CMsgReaderV3.cxx
  4. 2
    1
      common/rfb/CMsgReaderV3.h

+ 0
- 13
common/rfb/CMsgReader.cxx View File

@@ -138,19 +138,6 @@ void CMsgReader::readSetCursor(int width, int height, const Point& hotspot)
handler->setCursor(width, height, hotspot, data.buf, mask.buf);
}

void CMsgReader::readSetDesktopName(int x, int y, int w, int h)
{
char* name = is->readString();

if (x || y || w || h) {
fprintf(stderr, "Ignoring DesktopName rect with non-zero position/size\n");
} else {
handler->setName(name);
}

delete [] name;
}

rdr::U8* CMsgReader::getImageBuf(int required, int requested, int* nPixels)
{
int requiredBytes = required * (handler->cp.pf().bpp / 8);

+ 0
- 1
common/rfb/CMsgReader.h View File

@@ -60,7 +60,6 @@ namespace rfb {
virtual void readCopyRect(const Rect& r);

virtual void readSetCursor(int width, int height, const Point& hotspot);
virtual void readSetDesktopName(int x, int y, int w, int h);

CMsgReader(CMsgHandler* handler, rdr::InStream* is);


+ 14
- 0
common/rfb/CMsgReaderV3.cxx View File

@@ -101,3 +101,17 @@ void CMsgReaderV3::readFramebufferUpdate()
nUpdateRectsLeft = is->readU16();
handler->framebufferUpdateStart();
}

void CMsgReaderV3::readSetDesktopName(int x, int y, int w, int h)
{
char* name = is->readString();

if (x || y || w || h) {
fprintf(stderr, "Ignoring DesktopName rect with non-zero position/size\n");
} else {
handler->setName(name);
}

delete [] name;
}


+ 2
- 1
common/rfb/CMsgReaderV3.h View File

@@ -28,7 +28,8 @@ namespace rfb {
virtual void readServerInit();
virtual void readMsg();
private:
void readFramebufferUpdate();
virtual void readFramebufferUpdate();
virtual void readSetDesktopName(int x, int y, int w, int h);
int nUpdateRectsLeft;
};
}

Loading…
Cancel
Save