From: Andrew Innes Date: Thu, 21 Dec 2000 14:58:55 +0000 (+0000) Subject: (x_update_begin): Regenerate the palette here, rather X-Git-Tag: emacs-pretest-21.0.95~347 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=99012074ba9561666dd32d3f6645b8f29c7a444b;p=emacs.git (x_update_begin): Regenerate the palette here, rather than for each window. --- diff --git a/src/ChangeLog b/src/ChangeLog index 21915f30049..1001433b82d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2000-12-21 Andrew Innes + + * w32term.c (x_update_begin): Regenerate the palette here, rather + than for each window. + + * w32xfns.c (select_palette): Avoid calling SelectPalette if + palette is NULL, since this corrupts memory! Also get + display_info reference from frame. + 2000-12-21 Jason Rumney * w32bdf.c (w32_init_bdf_font): Fix test for valid bmp heap. diff --git a/src/w32term.c b/src/w32term.c index cf25b7e1080..c32b71ea1c2 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -544,16 +544,21 @@ w32_clear_window (f) /* Start an update of frame F. This function is installed as a hook for update_begin, i.e. it is called when update_begin is called. This function is called prior to calls to x_update_window_begin for - each window being updated. Currently, there is nothing to do here - because all interesting stuff is done on a window basis. */ + each window being updated. */ static void x_update_begin (f) struct frame *f; { - /* Nothing to do. We have to do something though, otherwise the - function gets optimized away and the hook is no longer valid. */ - struct frame *cf = f; + struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f); + + /* Regenerate display palette before drawing if list of requested + colors has changed. */ + if (display_info->regen_palette) + { + w32_regenerate_palette (f); + display_info->regen_palette = FALSE; + } } @@ -573,14 +578,6 @@ x_update_window_begin (w) BLOCK_INPUT; - /* Regenerate display palette before drawing if list of requested - colors has changed. */ - if (display_info->regen_palette) - { - w32_regenerate_palette (f); - display_info->regen_palette = FALSE; - } - if (f == display_info->mouse_face_mouse_frame) { /* Don't do highlighting for mouse motion during the update. */