mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-20 10:13:17 +00:00
Fixed behavior so when resolution change is detected, it will event the new resolution, and throw out the current CRC buffer, and re-init with the new resolution. This fixes issues on distros that had problems with KVM from login screen transition to logged in user.
This commit is contained in:
@@ -999,8 +999,28 @@ void* kvm_server_mainloop(void* parm)
|
||||
//fprintf(logFile, "After CheckDesktopSwitch.\n"); fflush(logFile);
|
||||
|
||||
imagedisplay = x11_exports->XOpenDisplay(CURRENT_XDISPLAY);
|
||||
|
||||
if (imagedisplay == NULL) { g_shutdown = 1; break; }
|
||||
|
||||
if (DisplayWidth(imagedisplay, CURRENT_DISPLAY_ID) != SCREEN_WIDTH ||
|
||||
DisplayHeight(imagedisplay, CURRENT_DISPLAY_ID) != SCREEN_HEIGHT ||
|
||||
DefaultDepth(eventdisplay, CURRENT_DISPLAY_ID) != SCREEN_DEPTH)
|
||||
{
|
||||
int old = TILE_HEIGHT_COUNT;
|
||||
SCREEN_HEIGHT = DisplayHeight(imagedisplay, CURRENT_DISPLAY_ID);
|
||||
SCREEN_WIDTH = DisplayWidth(imagedisplay, CURRENT_DISPLAY_ID);
|
||||
SCREEN_DEPTH = DefaultDepth(imagedisplay, CURRENT_DISPLAY_ID);
|
||||
if (logFile) { fprintf(logFile, "SLAVE/KVM Resolution Changed: %d x %d x %d bpp\n", SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_DEPTH); fflush(logFile); }
|
||||
|
||||
TILE_HEIGHT_COUNT = SCREEN_HEIGHT / TILE_HEIGHT;
|
||||
TILE_WIDTH_COUNT = SCREEN_WIDTH / TILE_WIDTH;
|
||||
if (SCREEN_WIDTH % TILE_WIDTH) { TILE_WIDTH_COUNT++; }
|
||||
if (SCREEN_HEIGHT % TILE_HEIGHT) { TILE_HEIGHT_COUNT++; }
|
||||
|
||||
kvm_send_resolution();
|
||||
reset_tile_info(old);
|
||||
}
|
||||
|
||||
|
||||
FD_ZERO(&readset);
|
||||
FD_ZERO(&errorset);
|
||||
FD_ZERO(&writeset);
|
||||
|
||||
Reference in New Issue
Block a user