aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2002-01-05 00:09:08 +0000
committerJason Rumney2002-01-05 00:09:08 +0000
commit6637c996f7a3d0fce9f34cf96739b5421551dcd2 (patch)
tree32cda7ee6253702540af49f6d4e53c5c5edb0459 /src
parent72e4adef0d6766f95e2d4952a79718faeb6db455 (diff)
downloademacs-6637c996f7a3d0fce9f34cf96739b5421551dcd2.tar.gz
emacs-6637c996f7a3d0fce9f34cf96739b5421551dcd2.zip
(x_setup_relief_colors): Don't compute an image's
background color if it doesn't have a Pixmap. (notice_overwritten_cursor): Don't depend on output_cursor and updated_area. Compare pixel coordinates with window's cursor pixel coordinates. (x_draw_glyphs, x_clear_end_of_line, show_mouse_face): Call notice_overwritten_cursor with new arg list. (show_mouse_face): Fix bug setting a row's mouse_face_p flag unconditionally. (x_draw_image_relief): Use predefined macro instead of constant when the value of `tool_bar_button_relief' is negative. (x_display_and_set_cursor): Fix PostMessage arg types.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog21
-rw-r--r--src/w32term.c44
2 files changed, 49 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ad54a7032b6..ea9b8720840 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,24 @@
12002-01-05 Jason Rumney <jasonr@gnu.org>
2
3 * w32fns.c (compute_tip_xy): If tooltip won't fit on the screen
4 to the left or to the right of the pointer, put it against
5 the left screen edge.
6 (x_frame_parms): Add missing braces around initializer.
7
8 * w32term.c (x_setup_relief_colors): Don't compute an image's
9 background color if it doesn't have a Pixmap.
10 (notice_overwritten_cursor): Don't depend on
11 output_cursor and updated_area. Compare pixel coordinates with
12 window's cursor pixel coordinates.
13 (x_draw_glyphs, x_clear_end_of_line, show_mouse_face): Call
14 notice_overwritten_cursor with new arg list.
15 (show_mouse_face): Fix bug setting a row's mouse_face_p flag
16 unconditionally.
17 (x_draw_image_relief): Use predefined macro instead of
18 constant when the value of `tool_bar_button_relief' is negative.
19
20 * w32term.c (x_display_and_set_cursor): Fix PostMessage arg types.
21
12002-01-04 Richard M. Stallman <rms@gnu.org> 222002-01-04 Richard M. Stallman <rms@gnu.org>
2 23
3 * xmenu.c (menu_highlight_callback): Hide any tooltip window. 24 * xmenu.c (menu_highlight_callback): Hide any tooltip window.
diff --git a/src/w32term.c b/src/w32term.c
index 96b4821a815..8a007602dd2 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -407,13 +407,17 @@ static void x_update_window_cursor P_ ((struct window *, int));
407static void x_erase_phys_cursor P_ ((struct window *)); 407static void x_erase_phys_cursor P_ ((struct window *));
408void x_display_cursor P_ ((struct window *w, int, int, int, int, int)); 408void x_display_cursor P_ ((struct window *w, int, int, int, int, int));
409void x_display_and_set_cursor P_ ((struct window *, int, int, int, int, int)); 409void x_display_and_set_cursor P_ ((struct window *, int, int, int, int, int));
410static void w32_draw_fringe_bitmap P_ ((struct window *, HDC hdc, struct glyph_row *, 410static void w32_draw_fringe_bitmap P_ ((struct window *, HDC hdc,
411 struct glyph_row *,
411 enum fringe_bitmap_type, int left_p)); 412 enum fringe_bitmap_type, int left_p));
412static void w32_clip_to_row P_ ((struct window *, struct glyph_row *, 413static void w32_clip_to_row P_ ((struct window *, struct glyph_row *,
413 HDC, int)); 414 HDC, int));
414static int x_phys_cursor_in_rect_p P_ ((struct window *, RECT *)); 415static int x_phys_cursor_in_rect_p P_ ((struct window *, RECT *));
415static void x_draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *)); 416static void x_draw_row_fringe_bitmaps P_ ((struct window *,
416static void notice_overwritten_cursor P_ ((struct window *, int, int)); 417 struct glyph_row *));
418static void notice_overwritten_cursor P_ ((struct window *,
419 enum glyph_row_area,
420 int, int, int, int));
417 421
418static Lisp_Object Qvendor_specific_keysyms; 422static Lisp_Object Qvendor_specific_keysyms;
419 423
@@ -3646,6 +3650,7 @@ x_setup_relief_colors (s)
3646 if (s->face->use_box_color_for_shadows_p) 3650 if (s->face->use_box_color_for_shadows_p)
3647 color = s->face->box_color; 3651 color = s->face->box_color;
3648 else if (s->first_glyph->type == IMAGE_GLYPH 3652 else if (s->first_glyph->type == IMAGE_GLYPH
3653 && s->img->pixmap
3649 && !IMAGE_BACKGROUND_TRANSPARENT (s->img, s->f, 0)) 3654 && !IMAGE_BACKGROUND_TRANSPARENT (s->img, s->f, 0))
3650 color = IMAGE_BACKGROUND (s->img, s->f, 0); 3655 color = IMAGE_BACKGROUND (s->img, s->f, 0);
3651 else 3656 else
@@ -3952,7 +3957,7 @@ x_draw_image_relief (s)
3952 if (s->hl == DRAW_IMAGE_SUNKEN 3957 if (s->hl == DRAW_IMAGE_SUNKEN
3953 || s->hl == DRAW_IMAGE_RAISED) 3958 || s->hl == DRAW_IMAGE_RAISED)
3954 { 3959 {
3955 thick = tool_bar_button_relief >= 0 ? tool_bar_button_relief : 3; 3960 thick = tool_bar_button_relief >= 0 ? tool_bar_button_relief : DEFAULT_TOOL_BAR_BUTTON_RELIEF;
3956 raised_p = s->hl == DRAW_IMAGE_RAISED; 3961 raised_p = s->hl == DRAW_IMAGE_RAISED;
3957 } 3962 }
3958 else 3963 else
@@ -5050,7 +5055,8 @@ x_draw_glyphs (w, x, row, area, start, end, hl, overlaps_p)
5050 x1 -= left_area_width; 5055 x1 -= left_area_width;
5051 } 5056 }
5052 5057
5053 notice_overwritten_cursor (w, x0, x1); 5058 notice_overwritten_cursor (w, area, x0, x1,
5059 row->y, MATRIX_ROW_BOTTOM_Y (row));
5054 } 5060 }
5055 5061
5056 /* Value is the x-position up to which drawn, relative to AREA of W. 5062 /* Value is the x-position up to which drawn, relative to AREA of W.
@@ -5270,10 +5276,13 @@ x_clear_end_of_line (to_x)
5270 5276
5271 /* Notice if the cursor will be cleared by this operation. */ 5277 /* Notice if the cursor will be cleared by this operation. */
5272 if (!updated_row->full_width_p) 5278 if (!updated_row->full_width_p)
5273 notice_overwritten_cursor (w, output_cursor.x, -1); 5279 notice_overwritten_cursor (w, updated_area,
5280 output_cursor.x, -1,
5281 updated_row->y,
5282 MATRIX_ROW_BOTTOM_Y (updated_row));
5274 5283
5275 from_x = output_cursor.x; 5284 from_x = output_cursor.x;
5276 5285
5277 /* Translate to frame coordinates. */ 5286 /* Translate to frame coordinates. */
5278 if (updated_row->full_width_p) 5287 if (updated_row->full_width_p)
5279 { 5288 {
@@ -7403,7 +7412,8 @@ show_mouse_face (dpyinfo, draw)
7403 x_draw_glyphs (w, start_x, row, TEXT_AREA, 7412 x_draw_glyphs (w, start_x, row, TEXT_AREA,
7404 start_hpos, end_hpos, draw, 0); 7413 start_hpos, end_hpos, draw, 0);
7405 7414
7406 row->mouse_face_p = draw == DRAW_MOUSE_FACE || DRAW_IMAGE_RAISED; 7415 row->mouse_face_p
7416 = draw == DRAW_MOUSE_FACE || draw == DRAW_IMAGE_RAISED;
7407 } 7417 }
7408 } 7418 }
7409 7419
@@ -9187,15 +9197,17 @@ w32_read_socket (sd, bufp, numchars, expected)
9187 of the line after START_X has been written. */ 9197 of the line after START_X has been written. */
9188 9198
9189static void 9199static void
9190notice_overwritten_cursor (w, start_x, end_x) 9200notice_overwritten_cursor (w, area, x0, x1, y0, y1)
9191 struct window *w; 9201 struct window *w;
9192 int start_x, end_x; 9202 enum glyph_row_area area;
9203 int x0, x1, y0, y1;
9193{ 9204{
9194 if (updated_area == TEXT_AREA 9205 if (area == TEXT_AREA
9195 && w->phys_cursor_on_p 9206 && w->phys_cursor_on_p
9196 && output_cursor.vpos == w->phys_cursor.vpos 9207 && y0 <= w->phys_cursor.y
9197 && start_x <= w->phys_cursor.x 9208 && y1 >= w->phys_cursor.y + w->phys_cursor_height
9198 && (end_x < 0 || end_x > w->phys_cursor.x)) 9209 && x0 <= w->phys_cursor.x
9210 && (x1 < 0 || x1 > w->phys_cursor.x))
9199 w->phys_cursor_on_p = 0; 9211 w->phys_cursor_on_p = 0;
9200} 9212}
9201 9213
@@ -9664,7 +9676,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
9664 if (w32_system_caret_hwnd 9676 if (w32_system_caret_hwnd
9665 && (w32_system_caret_height != w->phys_cursor_height 9677 && (w32_system_caret_height != w->phys_cursor_height
9666 || w32_system_caret_width != caret_width)) 9678 || w32_system_caret_width != caret_width))
9667 PostMessage (hwnd, WM_EMACS_DESTROY_CARET, NULL, NULL); 9679 PostMessage (hwnd, WM_EMACS_DESTROY_CARET, 0, 0);
9668 9680
9669 if (!w32_system_caret_hwnd) 9681 if (!w32_system_caret_hwnd)
9670 { 9682 {
@@ -9673,7 +9685,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
9673 } 9685 }
9674 9686
9675 /* Move the system caret. */ 9687 /* Move the system caret. */
9676 PostMessage (hwnd, WM_EMACS_TRACK_CARET, NULL, NULL); 9688 PostMessage (hwnd, WM_EMACS_TRACK_CARET, 0, 0);
9677 } 9689 }
9678 } 9690 }
9679 9691