aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-07-05 11:41:01 +0000
committerGerd Moellmann2000-07-05 11:41:01 +0000
commit88d757306e2266c7e26fe851e424466ea9d0a4ee (patch)
treee0328cc4101b527d42577155ebb4f8ae4473c867
parent45560b1ad437589024957bcb16211d4c1030907b (diff)
downloademacs-88d757306e2266c7e26fe851e424466ea9d0a4ee.tar.gz
emacs-88d757306e2266c7e26fe851e424466ea9d0a4ee.zip
(x_append_glyph, x_append_composite_glyph)
(x_produce_image_glyph, x_append_stretch_glyph): Accomodate to changes in struct glyph starting 1999-12-27. Some bit-fields of struct glyph were not set, which made glyphs unequal when compared with GLYPH_EQUAL_P. Redisplay outputs such glyphs, and flickering effects were the result. This also depended on the contents of memory returned by xmalloc. If flickering happens again, activate the code in clear_glyph_row that's in #if 0. If the flickering is gone with that, chances are that it is caused by something similar.
-rw-r--r--src/ChangeLog23
-rw-r--r--src/xterm.c69
2 files changed, 57 insertions, 35 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2cbbe1c5f77..dff4025fad2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,26 @@
12000-07-05 Gerd Moellmann <gerd@gnu.org>
2
3 * xterm.c (x_append_glyph, x_append_composite_glyph)
4 (x_produce_image_glyph, x_append_stretch_glyph): Accomodate to
5 changes in struct glyph starting 1999-12-27. Some bit-fields of
6 struct glyph were not set, which made glyphs unequal when compared
7 with GLYPH_EQUAL_P. Redisplay outputs such glyphs, and flickering
8 effects were the result. This also depended on the contents of
9 memory returned by xmalloc. If flickering happens again, activate
10 the code in clear_glyph_row that's in #if 0. If the flickering is
11 gone with that, chances are that it is caused by something
12 similar.
13
14 * dispnew.c (clear_glyph_row): Add debug code in #if 0.
15
16 * dispextern.h: Add some comments.
17
18 * window.c (add_window_to_list): Add parameter LIST.
19 (window_list): Order list so that, for each frame, windows are
20 in canonical order, and so that frames appear in the list in
21 the order given by Vframe_list.
22 (next_window): Reverse the handling of NEXT_P.
23
12000-07-04 Andrew Innes <andrewi@gnu.org> 242000-07-04 Andrew Innes <andrewi@gnu.org>
2 25
3 * alloca.c [emacs]: Include lisp.h (needed by atimer.h included 26 * alloca.c [emacs]: Include lisp.h (needed by atimer.h included
diff --git a/src/xterm.c b/src/xterm.c
index 96e3e97a3fd..743c7f8934d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1387,24 +1387,20 @@ x_append_glyph (it)
1387 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; 1387 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
1388 if (glyph < it->glyph_row->glyphs[area + 1]) 1388 if (glyph < it->glyph_row->glyphs[area + 1])
1389 { 1389 {
1390 /* Play it safe. If sub-structures of the glyph are not all the
1391 same size, it otherwise be that some bits stay set. This
1392 would prevent a comparison with GLYPH_EQUAL_P. */
1393 glyph->u.val = 0;
1394
1395 glyph->type = CHAR_GLYPH;
1396 glyph->pixel_width = it->pixel_width;
1397 glyph->u.ch = it->char_to_display;
1398 glyph->face_id = it->face_id;
1399 glyph->charpos = CHARPOS (it->position); 1390 glyph->charpos = CHARPOS (it->position);
1400 glyph->object = it->object; 1391 glyph->object = it->object;
1401 glyph->left_box_line_p = it->start_of_box_run_p; 1392 glyph->pixel_width = it->pixel_width;
1402 glyph->right_box_line_p = it->end_of_box_run_p;
1403 glyph->voffset = it->voffset; 1393 glyph->voffset = it->voffset;
1394 glyph->type = CHAR_GLYPH;
1404 glyph->multibyte_p = it->multibyte_p; 1395 glyph->multibyte_p = it->multibyte_p;
1396 glyph->left_box_line_p = it->start_of_box_run_p;
1397 glyph->right_box_line_p = it->end_of_box_run_p;
1405 glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent 1398 glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent
1406 || it->phys_descent > it->descent); 1399 || it->phys_descent > it->descent);
1400 glyph->padding_p = 0;
1407 glyph->glyph_not_available_p = it->glyph_not_available_p; 1401 glyph->glyph_not_available_p = it->glyph_not_available_p;
1402 glyph->face_id = it->face_id;
1403 glyph->u.ch = it->char_to_display;
1408 ++it->glyph_row->used[area]; 1404 ++it->glyph_row->used[area];
1409 } 1405 }
1410} 1406}
@@ -1424,23 +1420,20 @@ x_append_composite_glyph (it)
1424 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; 1420 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
1425 if (glyph < it->glyph_row->glyphs[area + 1]) 1421 if (glyph < it->glyph_row->glyphs[area + 1])
1426 { 1422 {
1427 /* Play it safe. If sub-structures of the glyph are not all the
1428 same size, it otherwise be that some bits stay set. This
1429 would prevent a comparison with GLYPH_EQUAL_P. */
1430 glyph->u.val = 0;
1431
1432 glyph->type = COMPOSITE_GLYPH;
1433 glyph->pixel_width = it->pixel_width;
1434 glyph->u.cmp_id = it->cmp_id;
1435 glyph->face_id = it->face_id;
1436 glyph->charpos = CHARPOS (it->position); 1423 glyph->charpos = CHARPOS (it->position);
1437 glyph->object = it->object; 1424 glyph->object = it->object;
1438 glyph->left_box_line_p = it->start_of_box_run_p; 1425 glyph->pixel_width = it->pixel_width;
1439 glyph->right_box_line_p = it->end_of_box_run_p;
1440 glyph->voffset = it->voffset; 1426 glyph->voffset = it->voffset;
1427 glyph->type = COMPOSITE_GLYPH;
1441 glyph->multibyte_p = it->multibyte_p; 1428 glyph->multibyte_p = it->multibyte_p;
1429 glyph->left_box_line_p = it->start_of_box_run_p;
1430 glyph->right_box_line_p = it->end_of_box_run_p;
1442 glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent 1431 glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent
1443 || it->phys_descent > it->descent); 1432 || it->phys_descent > it->descent);
1433 glyph->padding_p = 0;
1434 glyph->glyph_not_available_p = 0;
1435 glyph->face_id = it->face_id;
1436 glyph->u.cmp_id = it->cmp_id;
1444 ++it->glyph_row->used[area]; 1437 ++it->glyph_row->used[area];
1445 } 1438 }
1446} 1439}
@@ -1515,16 +1508,19 @@ x_produce_image_glyph (it)
1515 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; 1508 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
1516 if (glyph < it->glyph_row->glyphs[area + 1]) 1509 if (glyph < it->glyph_row->glyphs[area + 1])
1517 { 1510 {
1518 glyph->type = IMAGE_GLYPH;
1519 glyph->u.img_id = img->id;
1520 glyph->face_id = it->face_id;
1521 glyph->pixel_width = it->pixel_width;
1522 glyph->charpos = CHARPOS (it->position); 1511 glyph->charpos = CHARPOS (it->position);
1523 glyph->object = it->object; 1512 glyph->object = it->object;
1524 glyph->left_box_line_p = it->start_of_box_run_p; 1513 glyph->pixel_width = it->pixel_width;
1525 glyph->right_box_line_p = it->end_of_box_run_p;
1526 glyph->voffset = it->voffset; 1514 glyph->voffset = it->voffset;
1515 glyph->type = IMAGE_GLYPH;
1527 glyph->multibyte_p = it->multibyte_p; 1516 glyph->multibyte_p = it->multibyte_p;
1517 glyph->left_box_line_p = it->start_of_box_run_p;
1518 glyph->right_box_line_p = it->end_of_box_run_p;
1519 glyph->overlaps_vertically_p = 0;
1520 glyph->padding_p = 0;
1521 glyph->glyph_not_available_p = 0;
1522 glyph->face_id = it->face_id;
1523 glyph->u.img_id = img->id;
1528 ++it->glyph_row->used[area]; 1524 ++it->glyph_row->used[area];
1529 } 1525 }
1530 } 1526 }
@@ -1551,17 +1547,20 @@ x_append_stretch_glyph (it, object, width, height, ascent)
1551 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; 1547 glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
1552 if (glyph < it->glyph_row->glyphs[area + 1]) 1548 if (glyph < it->glyph_row->glyphs[area + 1])
1553 { 1549 {
1554 glyph->type = STRETCH_GLYPH;
1555 glyph->u.stretch.ascent = height * ascent;
1556 glyph->u.stretch.height = height;
1557 glyph->face_id = it->face_id;
1558 glyph->pixel_width = width;
1559 glyph->charpos = CHARPOS (it->position); 1550 glyph->charpos = CHARPOS (it->position);
1560 glyph->object = object; 1551 glyph->object = object;
1561 glyph->left_box_line_p = it->start_of_box_run_p; 1552 glyph->pixel_width = width;
1562 glyph->right_box_line_p = it->end_of_box_run_p;
1563 glyph->voffset = it->voffset; 1553 glyph->voffset = it->voffset;
1554 glyph->type = STRETCH_GLYPH;
1564 glyph->multibyte_p = it->multibyte_p; 1555 glyph->multibyte_p = it->multibyte_p;
1556 glyph->left_box_line_p = it->start_of_box_run_p;
1557 glyph->right_box_line_p = it->end_of_box_run_p;
1558 glyph->overlaps_vertically_p = 0;
1559 glyph->padding_p = 0;
1560 glyph->glyph_not_available_p = 0;
1561 glyph->face_id = it->face_id;
1562 glyph->u.stretch.ascent = height * ascent;
1563 glyph->u.stretch.height = height;
1565 ++it->glyph_row->used[area]; 1564 ++it->glyph_row->used[area];
1566 } 1565 }
1567} 1566}