aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2003-05-24 22:02:52 +0000
committerKim F. Storm2003-05-24 22:02:52 +0000
commitc655f6fdf292fea9340777de7c7ed01c88a728d1 (patch)
treebc96c027176619455f0204ad6c75dbf8acb4bd3c /src
parentcbbfe056c8e590f5c374e403c0cae26d3e1e01aa (diff)
downloademacs-c655f6fdf292fea9340777de7c7ed01c88a728d1.tar.gz
emacs-c655f6fdf292fea9340777de7c7ed01c88a728d1.zip
Make (several) trivial substitutions for renamed and
new macros in dispextern.h, frame.h and window.h. (IT_note_mouse_highlight): Use updated window coordinates returned by window_from_coordinates, rather than adjusting them locally. (internal_terminal_init): No need to initialize line_height here; it now defaults to 1.
Diffstat (limited to 'src')
-rw-r--r--src/msdos.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/msdos.c b/src/msdos.c
index 2c3d2837e4b..c558515ddfa 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -1260,8 +1260,8 @@ show_mouse_face (struct display_info *dpyinfo, int hl)
1260 row->mouse_face_p = hl > 0; 1260 row->mouse_face_p = hl > 0;
1261 if (hl > 0) 1261 if (hl > 0)
1262 { 1262 {
1263 int vpos = row->y + WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y (w); 1263 int vpos = row->y + WINDOW_TOP_EDGE_Y (w);
1264 int kstart = start_hpos + WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X (w); 1264 int kstart = start_hpos + WINDOW_LEFT_EDGE_X (w);
1265 int nglyphs = end_hpos - start_hpos; 1265 int nglyphs = end_hpos - start_hpos;
1266 int offset = ScreenPrimary + 2*(vpos*screen_size_X + kstart) + 1; 1266 int offset = ScreenPrimary + 2*(vpos*screen_size_X + kstart) + 1;
1267 int start_offset = offset; 1267 int start_offset = offset;
@@ -1303,8 +1303,8 @@ show_mouse_face (struct display_info *dpyinfo, int hl)
1303 /* IT_write_glyphs writes at cursor position, so we need to 1303 /* IT_write_glyphs writes at cursor position, so we need to
1304 temporarily move cursor coordinates to the beginning of 1304 temporarily move cursor coordinates to the beginning of
1305 the highlight region. */ 1305 the highlight region. */
1306 new_pos_X = start_hpos + WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X (w); 1306 new_pos_X = start_hpos + WINDOW_LEFT_EDGE_X (w);
1307 new_pos_Y = row->y + WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y (w); 1307 new_pos_Y = row->y + WINDOW_TOP_EDGE_Y (w);
1308 1308
1309 if (termscript) 1309 if (termscript)
1310 fprintf (termscript, "<MH- %d-%d:%d>", 1310 fprintf (termscript, "<MH- %d-%d:%d>",
@@ -1433,8 +1433,10 @@ IT_note_mode_line_highlight (struct window *w, int x, int mode_line_p)
1433 Lisp_Object help, map; 1433 Lisp_Object help, map;
1434 1434
1435 /* Find the glyph under X. */ 1435 /* Find the glyph under X. */
1436 glyph = row->glyphs[TEXT_AREA] 1436 glyph = (row->glyphs[TEXT_AREA]
1437 + x - FRAME_LEFT_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f); 1437 + x
1438 /* Does MS-DOG really support scroll-bars?? ++KFS */
1439 - WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w));
1438 end = glyph + row->used[TEXT_AREA]; 1440 end = glyph + row->used[TEXT_AREA];
1439 if (glyph < end 1441 if (glyph < end
1440 && STRINGP (glyph->object) 1442 && STRINGP (glyph->object)
@@ -1492,7 +1494,7 @@ IT_note_mouse_highlight (struct frame *f, int x, int y)
1492 } 1494 }
1493 1495
1494 /* Which window is that in? */ 1496 /* Which window is that in? */
1495 window = window_from_coordinates (f, x, y, &part, 0); 1497 window = window_from_coordinates (f, x, y, &part, &x, &y, 0);
1496 1498
1497 /* If we were displaying active text in another window, clear that. */ 1499 /* If we were displaying active text in another window, clear that. */
1498 if (! EQ (window, dpyinfo->mouse_face_window)) 1500 if (! EQ (window, dpyinfo->mouse_face_window))
@@ -1504,8 +1506,6 @@ IT_note_mouse_highlight (struct frame *f, int x, int y)
1504 1506
1505 /* Convert to window-relative coordinates. */ 1507 /* Convert to window-relative coordinates. */
1506 w = XWINDOW (window); 1508 w = XWINDOW (window);
1507 x -= WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X (w);
1508 y -= WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y (w);
1509 1509
1510 if (part == ON_MODE_LINE || part == ON_HEADER_LINE) 1510 if (part == ON_MODE_LINE || part == ON_HEADER_LINE)
1511 { 1511 {
@@ -1513,8 +1513,8 @@ IT_note_mouse_highlight (struct frame *f, int x, int y)
1513 IT_note_mode_line_highlight (w, x, part == ON_MODE_LINE); 1513 IT_note_mode_line_highlight (w, x, part == ON_MODE_LINE);
1514 return; 1514 return;
1515 } 1515 }
1516 else 1516
1517 IT_set_mouse_pointer (0); 1517 IT_set_mouse_pointer (0);
1518 1518
1519 /* Are we in a window whose display is up to date? 1519 /* Are we in a window whose display is up to date?
1520 And verify the buffer's text has not changed. */ 1520 And verify the buffer's text has not changed. */
@@ -1881,7 +1881,7 @@ IT_cmgoto (FRAME_PTR f)
1881 /* If we are in the echo area, put the cursor at the 1881 /* If we are in the echo area, put the cursor at the
1882 end of the echo area message. */ 1882 end of the echo area message. */
1883 if (!update_cursor_pos 1883 if (!update_cursor_pos
1884 && XFASTINT (XWINDOW (FRAME_MINIBUF_WINDOW (f))->top) <= new_pos_Y) 1884 && WINDOW_TOP_EDGE_LINE (XWINDOW (FRAME_MINIBUF_WINDOW (f))) <= new_pos_Y)
1885 { 1885 {
1886 int tem_X = current_pos_X, dummy; 1886 int tem_X = current_pos_X, dummy;
1887 1887
@@ -2548,7 +2548,6 @@ internal_terminal_init ()
2548 if (colors[1] >= 0 && colors[1] < 16) 2548 if (colors[1] >= 0 && colors[1] < 16)
2549 the_only_x_display.background_pixel = colors[1]; 2549 the_only_x_display.background_pixel = colors[1];
2550 } 2550 }
2551 the_only_x_display.line_height = 1;
2552 the_only_x_display.font = (XFontStruct *)1; /* must *not* be zero */ 2551 the_only_x_display.font = (XFontStruct *)1; /* must *not* be zero */
2553 the_only_x_display.display_info.mouse_face_mouse_frame = NULL; 2552 the_only_x_display.display_info.mouse_face_mouse_frame = NULL;
2554 the_only_x_display.display_info.mouse_face_deferred_gc = 0; 2553 the_only_x_display.display_info.mouse_face_deferred_gc = 0;
@@ -3383,7 +3382,7 @@ dos_rawgetc ()
3383 mouse_window = window_from_coordinates (SELECTED_FRAME(), 3382 mouse_window = window_from_coordinates (SELECTED_FRAME(),
3384 mouse_last_x, 3383 mouse_last_x,
3385 mouse_last_y, 3384 mouse_last_y,
3386 0, 0); 3385 0, 0, 0, 0);
3387 /* A window will be selected only when it is not 3386 /* A window will be selected only when it is not
3388 selected now, and the last mouse movement event was 3387 selected now, and the last mouse movement event was
3389 not in it. A minibuffer window will be selected iff 3388 not in it. A minibuffer window will be selected iff
@@ -4011,13 +4010,13 @@ XMenuDestroy (Display *foo, XMenu *menu)
4011int 4010int
4012x_pixel_width (struct frame *f) 4011x_pixel_width (struct frame *f)
4013{ 4012{
4014 return FRAME_WIDTH (f); 4013 return FRAME_COLS (f);
4015} 4014}
4016 4015
4017int 4016int
4018x_pixel_height (struct frame *f) 4017x_pixel_height (struct frame *f)
4019{ 4018{
4020 return FRAME_HEIGHT (f); 4019 return FRAME_LINES (f);
4021} 4020}
4022#endif /* !HAVE_X_WINDOWS */ 4021#endif /* !HAVE_X_WINDOWS */
4023 4022