| 470 | } |
| 471 | |
| 472 | int CBackendLibVNCServer::OnSize() |
| 473 | { |
| 474 | int nRet = 0; |
| 475 | int nWidth = m_pClient->width; |
| 476 | int nHeight = m_pClient->height; |
| 477 | |
| 478 | m_Image = QImage(nWidth, nHeight, QImage::Format_RGB32); |
| 479 | |
| 480 | m_pClient->frameBuffer = m_Image.bits(); |
| 481 | |
| 482 | m_pClient->format.bitsPerPixel = 32; |
| 483 | m_pClient->format.depth = m_Image.depth(); |
| 484 | m_pClient->format.redShift = 16; |
| 485 | m_pClient->format.greenShift = 8; |
| 486 | m_pClient->format.blueShift = 0; |
| 487 | m_pClient->format.redMax = 255; |
| 488 | m_pClient->format.greenMax = 255; |
| 489 | m_pClient->format.blueMax = 255; |
| 490 | SetFormatAndEncodings(m_pClient); |
| 491 | |
| 492 | emit sigSetDesktopSize(m_pClient->width, m_pClient->height); |
| 493 | return nRet; |
| 494 | } |
| 495 | |
| 496 | rfbBool CBackendLibVNCServer::cb_cursor_pos(rfbClient *client, int x, int y) |
| 497 | { |