| 172 | } |
| 173 | |
| 174 | void CConnection::authSuccess() |
| 175 | { |
| 176 | qDebug(RabbitVNC) << "CConnection::authSuccess(): state:" << state(); |
| 177 | // Set the connection parameters appropriately |
| 178 | QString name = RabbitCommon::CTools::GetHostName() |
| 179 | + "@" + RabbitCommon::CTools::GetCurrentUser(); |
| 180 | client.setName(name.toStdString().c_str()); |
| 181 | |
| 182 | //TODO: add client.setLEDState |
| 183 | // client.setLEDState |
| 184 | |
| 185 | int w = CDesktop::Instance()->Width(); |
| 186 | int h = CDesktop::Instance()->Height(); |
| 187 | client.setDimensions(w, h); |
| 188 | client.setPF(m_PixelFormat); |
| 189 | char buffer[256]; |
| 190 | client.pf().print(buffer, 256); |
| 191 | qInfo(RabbitVNC) << "Set server pixel format:" << buffer << "width:" << w << "height:" << h; |
| 192 | |
| 193 | // Mark the entire display as "dirty" |
| 194 | m_Updates.add_changed(rfb::Rect(0, 0, w, w)); |
| 195 | } |
| 196 | |
| 197 | void CConnection::clientInit(bool shared) |
| 198 | { |