]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix palette freeing on MS Windows with double buffering
authorPo Lu <luangruo@yahoo.com>
Sat, 30 Apr 2022 03:33:38 +0000 (11:33 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 30 Apr 2022 03:33:38 +0000 (11:33 +0800)
* src/w32term.c (w32_release_paint_buffer): Also release target
DC palette.

src/w32term.c

index ca96320a5ef8823164aedaddbbc7619df7fc18fb..1937f94645243559d1225f56721007de0b7f12b9 100644 (file)
@@ -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,