checkpoint. initial support for multiple displays on win32.

This commit is contained in:
crs
2002-06-19 17:03:29 +00:00
parent 29c90a3b6c
commit bebb63ac53
21 changed files with 289 additions and 236 deletions

View File

@@ -199,21 +199,21 @@ void
CServerProtocol1_0::recvInfo()
{
// parse the message
SInt16 x, y, w, h, zoneInfo;
SInt16 x, y, w, h, zoneInfo, mx, my;
CProtocolUtil::readf(getInputStream(), kMsgDInfo + 4,
&w, &h, &zoneInfo, &x, &y);
log((CLOG_DEBUG "received client \"%s\" info size=%dx%d, zone=%d, pos=%d,%d", getClient().c_str(), w, h, zoneInfo, x, y));
&x, &y, &w, &h, &zoneInfo, &mx, &my);
log((CLOG_DEBUG "received client \"%s\" info shape=%d,%d %dx%d, zone=%d, pos=%d,%d", getClient().c_str(), x, y, w, h, zoneInfo, mx, my));
// validate
if (w <= 0 || h <= 0 || zoneInfo < 0) {
throw XBadClient();
}
if (x < 0 || y < 0 || x >= w || y >= h) {
if (mx < x || my < y || mx >= x + w || my >= y + h) {
throw XBadClient();
}
// tell server of change
getServer()->setInfo(getClient(), w, h, zoneInfo, x, y);
getServer()->setInfo(getClient(), x, y, w, h, zoneInfo, mx, my);
}
void