[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 402c90c912 2/3: Fix palette freeing on MS Windows with double buf
From: |
Po Lu |
Subject: |
master 402c90c912 2/3: Fix palette freeing on MS Windows with double buffering |
Date: |
Sat, 30 Apr 2022 01:43:15 -0400 (EDT) |
branch: master
commit 402c90c912bfb96a8826854f7e2c1becb085a973
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix palette freeing on MS Windows with double buffering
* src/w32term.c (w32_release_paint_buffer): Also release target
DC palette.
---
src/w32term.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/w32term.c b/src/w32term.c
index ca96320a5e..1937f94645 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -312,6 +312,8 @@ w32_release_paint_buffer (struct frame *f)
enter_crit ();
if (FRAME_OUTPUT_DATA (f)->paint_buffer)
{
+ deselect_palette (f, FRAME_OUTPUT_DATA (f)->paint_buffer_handle);
+
SelectObject (FRAME_OUTPUT_DATA (f)->paint_dc,
FRAME_OUTPUT_DATA (f)->paint_dc_object);
ReleaseDC (FRAME_OUTPUT_DATA (f)->window_desc,