mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[client,x11] skip empty update rects
This commit is contained in:
@@ -260,8 +260,16 @@ int LogDynAndXCopyArea_ex(wLog* log, const char* file, const char* fkt, size_t l
|
||||
display, rc, attr.root, attr.depth, src_x, src_y, width, height, dest_x, dest_y);
|
||||
}
|
||||
|
||||
if ((width == 0) || (height == 0))
|
||||
{
|
||||
const DWORD lvl = WLOG_WARN;
|
||||
if (WLog_IsLevelActive(log, lvl))
|
||||
write_log(log, lvl, file, fkt, line, "XCopyArea(width=%d, height=%d) !", width, height);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const int rc = XCopyArea(display, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y);
|
||||
if (rc)
|
||||
if (rc != 1)
|
||||
WLog_WARN(TAG, "XCopyArea returned %d", rc);
|
||||
return rc;
|
||||
}
|
||||
@@ -280,6 +288,14 @@ int LogDynAndXPutImage_ex(wLog* log, const char* file, const char* fkt, size_t l
|
||||
height);
|
||||
}
|
||||
|
||||
if ((width == 0) || (height == 0))
|
||||
{
|
||||
const DWORD lvl = WLOG_WARN;
|
||||
if (WLog_IsLevelActive(log, lvl))
|
||||
write_log(log, lvl, file, fkt, line, "XPutImage(width=%d, height=%d) !", width, height);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const int rc = XPutImage(display, d, gc, image, src_x, src_y, dest_x, dest_y, width, height);
|
||||
if (rc)
|
||||
WLog_WARN(TAG, "XPutImage returned %d", rc);
|
||||
|
||||
Reference in New Issue
Block a user