From 58ab355bade710583e5f269e074d113d863c6268 Mon Sep 17 00:00:00 2001 From: Mehul Dhorda Date: Wed, 19 Nov 2014 11:48:12 -0800 Subject: [PATCH] Call redraw only when region is invalidated Added a condition to redraw a rect only when region is invalidated. For example. this avoids a redraw when only the cursor changes on the remote machine. --- client/iOS/FreeRDP/ios_freerdp_ui.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/iOS/FreeRDP/ios_freerdp_ui.m b/client/iOS/FreeRDP/ios_freerdp_ui.m index ada0e9cbc..6030fc6f0 100644 --- a/client/iOS/FreeRDP/ios_freerdp_ui.m +++ b/client/iOS/FreeRDP/ios_freerdp_ui.m @@ -106,7 +106,8 @@ void ios_ui_end_paint(rdpContext * context) rdpGdi *gdi = context->gdi; CGRect dirty_rect = CGRectMake(gdi->primary->hdc->hwnd->invalid->x, gdi->primary->hdc->hwnd->invalid->y, gdi->primary->hdc->hwnd->invalid->w, gdi->primary->hdc->hwnd->invalid->h); - [mfi->session performSelectorOnMainThread:@selector(setNeedsDisplayInRectAsValue:) withObject:[NSValue valueWithCGRect:dirty_rect] waitUntilDone:NO]; + if (gdi->primary->hdc->hwnd->invalid->null == 0) + [mfi->session performSelectorOnMainThread:@selector(setNeedsDisplayInRectAsValue:) withObject:[NSValue valueWithCGRect:dirty_rect] waitUntilDone:NO]; }