Mercurial > emacs
comparison src/xterm.c @ 83239:025da3ba778e
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-753
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-754
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-755
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-756
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-757
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-81
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-82
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-279
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Thu, 06 Jan 2005 15:05:01 +0000 |
parents | 4ee39d9428b0 b7ebbcf3b120 |
children | 3dcba0bc766b |
comparison
equal
deleted
inserted
replaced
83238:223c12363c0c | 83239:025da3ba778e |
---|---|
6001 f = x_window_to_frame (dpyinfo, event.xexpose.window); | 6001 f = x_window_to_frame (dpyinfo, event.xexpose.window); |
6002 if (f) | 6002 if (f) |
6003 { | 6003 { |
6004 x_check_fullscreen (f); | 6004 x_check_fullscreen (f); |
6005 | 6005 |
6006 #ifdef USE_GTK | |
6007 /* This seems to be needed for GTK 2.6. */ | |
6008 x_clear_area (event.xexpose.display, | |
6009 event.xexpose.window, | |
6010 event.xexpose.x, event.xexpose.y, | |
6011 event.xexpose.width, event.xexpose.height, | |
6012 FALSE); | |
6013 #endif | |
6006 if (f->async_visible == 0) | 6014 if (f->async_visible == 0) |
6007 { | 6015 { |
6008 f->async_visible = 1; | 6016 f->async_visible = 1; |
6009 f->async_iconified = 0; | 6017 f->async_iconified = 0; |
6010 f->output_data.x->has_been_visible = 1; | 6018 f->output_data.x->has_been_visible = 1; |
7843 | 7851 |
7844 FRAME_FONT (f) = (XFontStruct *) (fontp->font); | 7852 FRAME_FONT (f) = (XFontStruct *) (fontp->font); |
7845 FRAME_BASELINE_OFFSET (f) = fontp->baseline_offset; | 7853 FRAME_BASELINE_OFFSET (f) = fontp->baseline_offset; |
7846 FRAME_FONTSET (f) = -1; | 7854 FRAME_FONTSET (f) = -1; |
7847 | 7855 |
7848 FRAME_COLUMN_WIDTH (f) = FONT_WIDTH (FRAME_FONT (f)); | 7856 FRAME_COLUMN_WIDTH (f) = fontp->average_width; |
7857 FRAME_SPACE_WIDTH (f) = fontp->space_width; | |
7849 FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (FRAME_FONT (f)); | 7858 FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (FRAME_FONT (f)); |
7850 | 7859 |
7851 compute_fringe_widths (f, 1); | 7860 compute_fringe_widths (f, 1); |
7852 | 7861 |
7853 /* Compute the scroll bar width in character columns. */ | 7862 /* Compute the scroll bar width in character columns. */ |
9787 bzero (fontp, sizeof (*fontp)); | 9796 bzero (fontp, sizeof (*fontp)); |
9788 fontp->font = font; | 9797 fontp->font = font; |
9789 fontp->font_idx = i; | 9798 fontp->font_idx = i; |
9790 fontp->name = (char *) xmalloc (strlen (fontname) + 1); | 9799 fontp->name = (char *) xmalloc (strlen (fontname) + 1); |
9791 bcopy (fontname, fontp->name, strlen (fontname) + 1); | 9800 bcopy (fontname, fontp->name, strlen (fontname) + 1); |
9801 | |
9802 if (font->min_bounds.width == font->max_bounds.width) | |
9803 { | |
9804 /* Fixed width font. */ | |
9805 fontp->average_width = fontp->space_width = font->min_bounds.width; | |
9806 } | |
9807 else | |
9808 { | |
9809 XChar2b char2b; | |
9810 XCharStruct *pcm; | |
9811 | |
9812 char2b.byte1 = 0x00, char2b.byte2 = 0x20; | |
9813 pcm = x_per_char_metric (font, &char2b, 0); | |
9814 if (pcm) | |
9815 fontp->space_width = pcm->width; | |
9816 else | |
9817 fontp->space_width = FONT_WIDTH (font); | |
9818 | |
9819 fontp->average_width | |
9820 = (XGetFontProperty (font, dpyinfo->Xatom_AVERAGE_WIDTH, &value) | |
9821 ? (long) value / 10 : 0); | |
9822 if (fontp->average_width < 0) | |
9823 fontp->average_width = - fontp->average_width; | |
9824 if (fontp->average_width == 0) | |
9825 { | |
9826 if (pcm) | |
9827 { | |
9828 int width = pcm->width; | |
9829 for (char2b.byte2 = 33; char2b.byte2 <= 126; char2b.byte2++) | |
9830 if ((pcm = x_per_char_metric (font, &char2b, 0)) != NULL) | |
9831 width += pcm->width; | |
9832 fontp->average_width = width / 95; | |
9833 } | |
9834 else | |
9835 fontp->average_width = FONT_WIDTH (font); | |
9836 } | |
9837 } | |
9792 | 9838 |
9793 /* Try to get the full name of FONT. Put it in FULL_NAME. */ | 9839 /* Try to get the full name of FONT. Put it in FULL_NAME. */ |
9794 full_name = 0; | 9840 full_name = 0; |
9795 if (XGetFontProperty (font, XA_FONT, &value)) | 9841 if (XGetFontProperty (font, XA_FONT, &value)) |
9796 { | 9842 { |
10423 dpyinfo->Xatom_ATOM_PAIR | 10469 dpyinfo->Xatom_ATOM_PAIR |
10424 = XInternAtom (dpyinfo->display, "ATOM_PAIR", False); | 10470 = XInternAtom (dpyinfo->display, "ATOM_PAIR", False); |
10425 /* For properties of font. */ | 10471 /* For properties of font. */ |
10426 dpyinfo->Xatom_PIXEL_SIZE | 10472 dpyinfo->Xatom_PIXEL_SIZE |
10427 = XInternAtom (dpyinfo->display, "PIXEL_SIZE", False); | 10473 = XInternAtom (dpyinfo->display, "PIXEL_SIZE", False); |
10474 dpyinfo->Xatom_AVERAGE_WIDTH | |
10475 = XInternAtom (dpyinfo->display, "AVERAGE_WIDTH", False); | |
10428 dpyinfo->Xatom_MULE_BASELINE_OFFSET | 10476 dpyinfo->Xatom_MULE_BASELINE_OFFSET |
10429 = XInternAtom (dpyinfo->display, "_MULE_BASELINE_OFFSET", False); | 10477 = XInternAtom (dpyinfo->display, "_MULE_BASELINE_OFFSET", False); |
10430 dpyinfo->Xatom_MULE_RELATIVE_COMPOSE | 10478 dpyinfo->Xatom_MULE_RELATIVE_COMPOSE |
10431 = XInternAtom (dpyinfo->display, "_MULE_RELATIVE_COMPOSE", False); | 10479 = XInternAtom (dpyinfo->display, "_MULE_RELATIVE_COMPOSE", False); |
10432 dpyinfo->Xatom_MULE_DEFAULT_ASCENT | 10480 dpyinfo->Xatom_MULE_DEFAULT_ASCENT |