aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2000-12-22 11:33:37 +0000
committerJason Rumney2000-12-22 11:33:37 +0000
commit9436cdf9a606ffcb470b86a1e3b39684a4e8b0d2 (patch)
tree7723d2d4121c4b786d34271e7d118fe7fb37f429 /src
parent85145dac0fa48d717f75d2216e26c99c89b22749 (diff)
downloademacs-9436cdf9a606ffcb470b86a1e3b39684a4e8b0d2.tar.gz
emacs-9436cdf9a606ffcb470b86a1e3b39684a4e8b0d2.zip
(w32_draw_bitmap): Fix drawing so it does not appear in the wrong colors
when the foreground is not black. (expose_window): Don't redraw the window that's currently being updated.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/w32term.c32
2 files changed, 22 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 75e6de5fd33..1d076114f9b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12000-12-22 Jason Rumney <jasonr@gnu.org>
2
3 * w32term.c (w32_draw_bitmap): Fix drawing so it does not appear
4 in the wrong colors when the foreground is not black.
5 (expose_window): Don't redraw the window that's currently being
6 updated.
7
12000-12-22 Gerd Moellmann <gerd@gnu.org> 82000-12-22 Gerd Moellmann <gerd@gnu.org>
2 9
3 * window.c (delete_window): Simplify somewhat. 10 * window.c (delete_window): Simplify somewhat.
diff --git a/src/w32term.c b/src/w32term.c
index c32b71ea1c2..ff56139315c 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -792,7 +792,6 @@ w32_draw_bitmap (w, hdc, row, which)
792 HDC compat_hdc; 792 HDC compat_hdc;
793 int x, y, wd, h, dy; 793 int x, y, wd, h, dy;
794 HBITMAP pixmap; 794 HBITMAP pixmap;
795 HBRUSH fg_brush, orig_brush;
796 HANDLE horig_obj; 795 HANDLE horig_obj;
797 struct face *face; 796 struct face *face;
798 797
@@ -867,21 +866,14 @@ w32_draw_bitmap (w, hdc, row, which)
867 866
868 compat_hdc = CreateCompatibleDC (hdc); 867 compat_hdc = CreateCompatibleDC (hdc);
869 SaveDC (hdc); 868 SaveDC (hdc);
870 fg_brush = CreateSolidBrush (face->foreground); 869
871 orig_brush = SelectObject (hdc, fg_brush);
872 horig_obj = SelectObject (compat_hdc, pixmap); 870 horig_obj = SelectObject (compat_hdc, pixmap);
873 SetTextColor (hdc, face->foreground); 871 SetTextColor (hdc, face->background);
874 SetBkColor (hdc, face->background); 872 SetBkColor (hdc, face->foreground);
875#if 0 /* From w32bdf.c (which is from Meadow). */ 873
876 /* Old versions - in case we find a reason to fall back on them. */
877 BitBlt (hdc, x, y + dy, wd, h, compat_hdc, 0, 0, SRCCOPY); 874 BitBlt (hdc, x, y + dy, wd, h, compat_hdc, 0, 0, SRCCOPY);
878 BitBlt (hdc, x, y + dy, wd, h, compat_hdc, 0, 0, 0xB8074A); 875
879#else
880 BitBlt (hdc, x, y + dy, wd, h, compat_hdc, 0, 0, 0xE20746);
881#endif
882 SelectObject (compat_hdc, horig_obj); 876 SelectObject (compat_hdc, horig_obj);
883 SelectObject (hdc, orig_brush);
884 DeleteObject (fg_brush);
885 DeleteDC (compat_hdc); 877 DeleteDC (compat_hdc);
886 RestoreDC (hdc, -1); 878 RestoreDC (hdc, -1);
887} 879}
@@ -3853,9 +3845,11 @@ x_draw_image_foreground (s)
3853#if 0 /* From w32bdf.c (which is from Meadow). */ 3845#if 0 /* From w32bdf.c (which is from Meadow). */
3854 BitBlt (s->hdc, x, y, s->img->width, s->img->height, 3846 BitBlt (s->hdc, x, y, s->img->width, s->img->height,
3855 compat_hdc, 0, 0, SRCCOPY); 3847 compat_hdc, 0, 0, SRCCOPY);
3856#else
3857 BitBlt (s->hdc, x, y, s->img->width, s->img->height, 3848 BitBlt (s->hdc, x, y, s->img->width, s->img->height,
3858 compat_hdc, 0, 0, 0xB8074A); 3849 compat_hdc, 0, 0, 0xB8074A);
3850#else
3851 BitBlt (s->hdc, x, y, s->img->width, s->img->height,
3852 compat_hdc, 0, 0, 0xE20746);
3859#endif 3853#endif
3860 SelectObject (s->hdc, orig_brush); 3854 SelectObject (s->hdc, orig_brush);
3861 DeleteObject (fg_brush); 3855 DeleteObject (fg_brush);
@@ -3998,9 +3992,11 @@ w32_draw_image_foreground_1 (s, pixmap)
3998#if 0 /* From w32bdf.c (which is from Meadow). */ 3992#if 0 /* From w32bdf.c (which is from Meadow). */
3999 BitBlt (hdc, x, y, s->img->width, s->img->height, 3993 BitBlt (hdc, x, y, s->img->width, s->img->height,
4000 compat_hdc, 0, 0, SRCCOPY); 3994 compat_hdc, 0, 0, SRCCOPY);
4001#else
4002 BitBlt (hdc, x, y, s->img->width, s->img->height, 3995 BitBlt (hdc, x, y, s->img->width, s->img->height,
4003 compat_hdc, 0, 0, 0xB8074A); 3996 compat_hdc, 0, 0, 0xB8074A);
3997#else
3998 BitBlt (hdc, x, y, s->img->width, s->img->height,
3999 compat_hdc, 0, 0, 0xE20746);
4004#endif 4000#endif
4005 SelectObject (hdc, orig_brush); 4001 SelectObject (hdc, orig_brush);
4006 DeleteObject (fg_brush); 4002 DeleteObject (fg_brush);
@@ -4154,9 +4150,11 @@ x_draw_image_glyph_string (s)
4154#if 0 /* From w32bdf.c (which is from Meadow). */ 4150#if 0 /* From w32bdf.c (which is from Meadow). */
4155 BitBlt (s->hdc, s->x, s->y, s->background_width, s->height, 4151 BitBlt (s->hdc, s->x, s->y, s->background_width, s->height,
4156 compat_hdc, 0, 0, SRCCOPY); 4152 compat_hdc, 0, 0, SRCCOPY);
4157#else
4158 BitBlt (s->hdc, s->x, s->y, s->background_width, s->height, 4153 BitBlt (s->hdc, s->x, s->y, s->background_width, s->height,
4159 compat_hdc, 0, 0, 0xB8074A); 4154 compat_hdc, 0, 0, 0xB8074A);
4155#else
4156 BitBlt (s->hdc, s->x, s->y, s->background_width, s->height,
4157 compat_hdc, 0, 0, 0xE20746);
4160#endif 4158#endif
4161 SelectObject (s->hdc, orig_brush); 4159 SelectObject (s->hdc, orig_brush);
4162 DeleteObject (fg_brush); 4160 DeleteObject (fg_brush);
@@ -5632,7 +5630,7 @@ expose_window (w, r)
5632 happen when toolkit scroll bars are used and a window is split. 5630 happen when toolkit scroll bars are used and a window is split.
5633 Reconfiguring the scroll bar will generate an expose for a newly 5631 Reconfiguring the scroll bar will generate an expose for a newly
5634 created window. */ 5632 created window. */
5635 if (w->current_matrix == NULL) 5633 if (w->current_matrix == NULL || w == updated_window)
5636 return; 5634 return;
5637 5635
5638 TRACE ((stderr, "expose_window (%d, %d, %d, %d)\n", 5636 TRACE ((stderr, "expose_window (%d, %d, %d, %d)\n",