mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Optimize imageviewer's XCB_EXPOSE handling
This commit is contained in:
1 parent
4a83eba3f9
commit
731350f8f9
1 file changed
+2
-1
@@ -412,7 +412,8 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
switch (event->response_type & 0x7F) {
|
switch (event->response_type & 0x7F) {
|
||||||
case XCB_EXPOSE: {
|
case XCB_EXPOSE: {
|
||||||
if (loaded) {
|
xcb_expose_event_t* e = (xcb_expose_event_t*)event;
|
||||||
|
if (loaded && (e->count == 0)) {
|
||||||
xcb_copy_area(c, g_pixmap, w, g, 0, 0, 0, 0, g_width, g_height);
|
xcb_copy_area(c, g_pixmap, w, g, 0, 0, 0, 0, g_width, g_height);
|
||||||
xcb_flush(c);
|
xcb_flush(c);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user