changeset 74:74f5e1844b8c

Update to using the 3.2 function dw_render_redraw() to optimize draws on GTK3/4.
author Brian Smith <brian@dbsoft.org>
date Mon, 08 Mar 2021 15:25:43 -0600
parents adf40637cbb3
children d5b0c9057be2
files cc.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/cc.c	Tue Mar 02 21:54:49 2021 -0600
+++ b/cc.c	Mon Mar 08 15:25:43 2021 -0600
@@ -467,8 +467,8 @@
 		{
 			if(gList[z].Update)
 				gList[z].Update(&gList[z], 0);
-			if(gList[z].Draw && !(gList[z].Flags & fHidden))
-				gList[z].Draw(&gList[z]);
+			if(gList[z].Draw && gList[z].hwndDraw && !(gList[z].Flags & fHidden))
+				dw_render_redraw(gList[z].hwndDraw[0]);
 			z++;
 		}
 		dw_mutex_unlock(hMtx);
@@ -572,9 +572,7 @@
 	{
 		current_colors[color] = newcol;
 
-		dw_window_get_pos_size(hwnd, NULL, NULL, &thiswidth, &thisheight);
-		dw_color_foreground_set(newcol);
-		dw_draw_rect(hwnd, 0, DW_DRAW_FILL | DW_DRAW_NOAA, 0, 0, thiswidth, thisheight);
+		dw_render_redraw(hwnd);
 	}
 	return TRUE;
 }