return true;
}
-bool SMsgWriter::writeExtendedDesktopSize(rdr::U16 reason, rdr::U16 result,
- int fb_width, int fb_height,
- const ScreenSet& layout) {
+bool SMsgWriter::writeExtendedDesktopSize(rdr::U16 reason, rdr::U16 result) {
ExtendedDesktopSizeMsg msg;
if (!client->supportsEncoding(pseudoEncodingExtendedDesktopSize))
msg.reason = reason;
msg.result = result;
- msg.fb_width = fb_width;
- msg.fb_height = fb_height;
- msg.layout = layout;
extendedDesktopSizeMsgs.push_back(msg);
for (ri = extendedDesktopSizeMsgs.begin();ri != extendedDesktopSizeMsgs.end();++ri) {
writeExtendedDesktopSizeRect(ri->reason, ri->result,
- ri->fb_width, ri->fb_height, ri->layout);
+ client->width(), client->height(),
+ client->screenLayout());
}
extendedDesktopSizeMsgs.clear();
// generic update of the current server state, but the second queues a
// specific message.
bool writeExtendedDesktopSize();
- bool writeExtendedDesktopSize(rdr::U16 reason, rdr::U16 result,
- int fb_width, int fb_height,
- const ScreenSet& layout);
+ bool writeExtendedDesktopSize(rdr::U16 reason, rdr::U16 result);
bool writeSetDesktopName();
typedef struct {
rdr::U16 reason, result;
- int fb_width, fb_height;
- ScreenSet layout;
} ExtendedDesktopSizeMsg;
std::list<ExtendedDesktopSizeMsg> extendedDesktopSizeMsgs;
// Don't bother the desktop with an invalid configuration
if (!layout.validate(fb_width, fb_height)) {
- writer()->writeExtendedDesktopSize(reasonClient, resultInvalid,
- fb_width, fb_height, layout);
+ writer()->writeExtendedDesktopSize(reasonClient, resultInvalid);
return;
}
// protocol-wise, but unnecessary.
result = server->desktop->setScreenLayout(fb_width, fb_height, layout);
- writer()->writeExtendedDesktopSize(reasonClient, result,
- fb_width, fb_height, layout);
+ writer()->writeExtendedDesktopSize(reasonClient, result);
// Only notify other clients on success
if (result == resultSuccess) {
if (state() != RFBSTATE_NORMAL)
return;
- writer()->writeExtendedDesktopSize(reason, 0,
- client.width(), client.height(),
- client.screenLayout());
+ writer()->writeExtendedDesktopSize(reason, 0);
}