Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 145764 Details for
Bug 222340
xterm -fa font size change anomaly (small becomes gigantic)
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
several fixes for font-switching
xterm-223b.patch (text/plain), 8.41 KB, created by
Thomas E. Dickey
on 2007-01-17 01:25:28 UTC
(
hide
)
Description:
several fixes for font-switching
Filename:
MIME Type:
Creator:
Thomas E. Dickey
Created:
2007-01-17 01:25:28 UTC
Size:
8.41 KB
patch
obsolete
># patch by Thomas E. Dickey <dickey@invisible-island.net> ># created Wed Jan 17 01:22:38 UTC 2007 ># ------------------------------------------------------------------------------ ># charproc.c | 71 ++++++++++++++++++++++++++++++++++++------------------- ># fontutils.c | 5 ++- ># menu.c | 6 ++-- ># misc.c | 11 +++++--- ># version.h | 4 +-- ># xterm.log.html | 16 +++++++++++- ># 6 files changed, 77 insertions(+), 36 deletions(-) ># ------------------------------------------------------------------------------ >Index: charproc.c >--- xterm-223+/charproc.c 2006-11-28 20:45:37.000000000 +0000 >+++ xterm-223b/charproc.c 2007-01-17 01:18:01.000000000 +0000 >@@ -1,4 +1,4 @@ >-/* $XTermId: charproc.c,v 1.740 2006/11/28 20:45:37 tom Exp $ */ >+/* $XTermId: charproc.c,v 1.742 2007/01/17 01:18:01 tom Exp $ */ > > /* $XFree86: xc/programs/xterm/charproc.c,v 3.185 2006/06/20 00:42:38 dickey Exp $ */ > >@@ -7446,35 +7446,55 @@ > > /* ARGSUSED */ > static void >-DoSetSelectedFont(Widget w GCC_UNUSED, >+DoSetSelectedFont(Widget w, > XtPointer client_data GCC_UNUSED, > Atom * selection GCC_UNUSED, > Atom * type, > XtPointer value, >- unsigned long *length GCC_UNUSED, >+ unsigned long *length, > int *format) > { >- char *val = (char *) value; >- int len; >- if (*type != XA_STRING || *format != 8) { >+ if (!IsXtermWidget(w) || *type != XA_STRING || *format != 8) { > Bell(XkbBI_MinorError, 0); >- return; >- } >- len = strlen(val); >- if (len > 0) { >- if (val[len - 1] == '\n') >- val[len - 1] = '\0'; >- /* Do some sanity checking to avoid sending a long selection >- back to the server in an OpenFont that is unlikely to succeed. >- XLFD allows up to 255 characters and no control characters; >- we are a little more liberal here. */ >- if (len > 1000 || strchr(val, '\n')) >- return; >- if (!xtermLoadFont(term, >- xtermFontName(val), >- True, >- fontMenu_fontsel)) >- Bell(XkbBI_MinorError, 0); >+ } else { >+ XtermWidget xw = (XtermWidget) w; >+ char *save = xw->screen.MenuFontName(fontMenu_fontsel); >+ char *val = (char *) value; >+ char *test = 0; >+ char *used = 0; >+ int len = strlen(val); >+ >+ if (len > (int) *length) { >+ len = (int) *length; >+ } >+ if (len > 0) { >+ val[len] = '\0'; >+ used = x_strtrim(val); >+ TRACE(("DoSetSelectedFont(%s)\n", val)); >+ /* Do some sanity checking to avoid sending a long selection >+ back to the server in an OpenFont that is unlikely to succeed. >+ XLFD allows up to 255 characters and no control characters; >+ we are a little more liberal here. */ >+ if (len < 1000 >+ && !strchr(val, '\n') >+ && (test = x_strdup(val)) != 0) { >+ xw->screen.MenuFontName(fontMenu_fontsel) = test; >+ if (!xtermLoadFont(term, >+ xtermFontName(val), >+ True, >+ fontMenu_fontsel)) { >+ Bell(XkbBI_MinorError, 0); >+ free(test); >+ xw->screen.MenuFontName(fontMenu_fontsel) = save; >+ } else { >+ free(save); >+ } >+ } else { >+ Bell(XkbBI_MinorError, 0); >+ } >+ if (used != val) >+ free(used); >+ } > } > } > >@@ -7488,7 +7508,10 @@ > Atom target; > > if (!atom_name) >- atom_name = "PRIMARY"; >+ atom_name = (xw->screen.mappedSelect >+ ? xw->screen.mappedSelect[0] >+ : "PRIMARY"); >+ TRACE(("FindFontSelection(%s)\n", atom_name)); > > for (pAtom = atoms, a = atomCount; a; a--, pAtom++) { > if (strcmp(atom_name, XmuNameOfAtom(*pAtom)) == 0) >Index: fontutils.c >--- xterm-223+/fontutils.c 2006-11-29 21:57:00.000000000 +0000 >+++ xterm-223b/fontutils.c 2007-01-15 01:20:08.000000000 +0000 >@@ -1,4 +1,4 @@ >-/* $XTermId: fontutils.c,v 1.219 2006/11/29 21:57:00 tom Exp $ */ >+/* $XTermId: fontutils.c,v 1.220 2007/01/15 01:20:08 tom Exp $ */ > > /* > * $XFree86: xc/programs/xterm/fontutils.c,v 1.60 2006/04/30 21:55:39 dickey Exp $ >@@ -6,7 +6,7 @@ > > /************************************************************ > >-Copyright 1998-2005,2006 by Thomas E. Dickey >+Copyright 1998-2006,2007 by Thomas E. Dickey > > All Rights Reserved > >@@ -1493,6 +1493,7 @@ > * but this is simpler than adding another resource value - and > * as noted above, the data for the fixed fonts are available. > */ >+ lookupOneFontSize(screen, 0); > lookupOneFontSize(screen, fontnum); > if (fontnum == fontMenu_fontdefault) { > face_size = 14.0; >Index: menu.c >--- xterm-223+/menu.c 2006-11-23 01:18:29.000000000 +0000 >+++ xterm-223b/menu.c 2007-01-16 21:38:02.000000000 +0000 >@@ -1,8 +1,8 @@ >-/* $XTermId: menu.c,v 1.222 2006/11/23 01:18:29 tom Exp $ */ >+/* $XTermId: menu.c,v 1.223 2007/01/16 21:38:02 tom Exp $ */ > > /* > >-Copyright 1999-2005,2006 by Thomas E. Dickey >+Copyright 1999-2006,2007 by Thomas E. Dickey > > All Rights Reserved > >@@ -656,7 +656,7 @@ > set_menu_font(True); > SetItemSensitivity( > fontMenuEntries[fontMenu_fontescape].widget, >- (screen->menu_font_names[fontMenu_fontescape] >+ (screen->menu_font_names[fontMenu_fontescape][fNorm] > ? True : False)); > #if OPT_BOX_CHARS > update_font_boxchars(); >Index: misc.c >--- xterm-223+/misc.c 2006-11-30 22:25:33.000000000 +0000 >+++ xterm-223b/misc.c 2007-01-16 23:24:48.000000000 +0000 >@@ -1,4 +1,4 @@ >-/* $XTermId: misc.c,v 1.332 2006/11/30 22:25:33 tom Exp $ */ >+/* $XTermId: misc.c,v 1.333 2007/01/16 23:24:48 tom Exp $ */ > > /* $XFree86: xc/programs/xterm/misc.c,v 3.107 2006/06/19 00:36:51 dickey Exp $ */ > >@@ -1860,6 +1860,7 @@ > unparseputc1(xw, final); > unparse_end(xw); > } else if (buf != 0) { >+ int num = screen->menu_font_number; > VTFontNames fonts; > > memset(&fonts, 0, sizeof(fonts)); >@@ -1870,7 +1871,6 @@ > * corresponding menu font entry. > */ > if (*buf == '#') { >- int num = screen->menu_font_number; > int rel = 0; > > if (*++buf == '+') { >@@ -1893,19 +1893,22 @@ > num = 0; > } > >- if (rel != 0) >+ if (rel != 0) { > num = lookupRelativeFontSize(screen, > screen->menu_font_number, rel); > >+ } > if (num < 0 > || num > fontMenu_lastBuiltin > || (buf = screen->MenuFontName(num)) == 0) { > Bell(XkbBI_MinorError, 0); > break; > } >+ } else { >+ num = fontMenu_fontescape; > } > fonts.f_n = buf; >- SetVTFont(xw, fontMenu_fontescape, True, &fonts); >+ SetVTFont(xw, num, True, &fonts); > } > #endif /* OPT_SHIFT_FONTS */ > break; >Index: version.h >--- xterm-223+/version.h 2006-11-30 22:23:57.000000000 +0000 >+++ xterm-223b/version.h 2007-01-16 20:11:25.000000000 +0000 >@@ -1,4 +1,4 @@ >-/* $XTermId: version.h,v 1.278 2006/11/30 22:23:57 tom Exp $ */ >+/* $XTermId: version.h,v 1.279 2007/01/16 20:11:25 tom Exp $ */ > /* $XFree86: xc/programs/xterm/version.h,v 3.126 2006/06/20 00:42:38 dickey Exp $ */ > > /* >@@ -7,7 +7,7 @@ > * version of X to which this version of xterm has been built. The number in > * parentheses is my patch number (T.Dickey). > */ >-#define XTERM_PATCH 223 >+#define XTERM_PATCH 224 > > #ifndef __vendorversion__ > #define __vendorversion__ "XTerm" >Index: xterm.log.html >--- xterm-223+/xterm.log.html 2006-12-01 01:10:03.000000000 +0000 >+++ xterm-223b/xterm.log.html 2007-01-17 00:25:55.000000000 +0000 >@@ -20,7 +20,7 @@ > * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * > * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * > ***************************************************************************** >- $XTermId: xterm.log.html,v 1.499 2006/12/01 01:10:03 tom Exp $ >+ $XTermId: xterm.log.html,v 1.502 2007/01/17 00:25:55 tom Exp $ > $XFree86: xc/programs/xterm/xterm.log.html,v 1.151 2006/06/20 00:42:38 dickey Exp $ > --> > <HTML> >@@ -46,6 +46,7 @@ > is the latest version of this file. > > <UL> >+<LI><A HREF="#xterm_dev">Development</A> > <LI><A HREF="#xterm_223">Patch #223 - 2006/11/30</A> > <LI><A HREF="#xterm_222">Patch #222 - 2006/10/17</A> > <LI><A HREF="#xterm_221">Patch #221 - 2006/10/1</A> >@@ -272,6 +273,19 @@ > <LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A> > </UL> > >+<H1><A NAME="xterm_dev">Development</A></H1> >+<ul> >+ <li>make <code>Selection</code> of <code>VT Fonts</code> work with >+ <code>selectToClipboard</code> resource. >+ >+ <li>correct length calculation for <code>Selection</code> entry of >+ <code>VT Fonts</code> menu, broken since it ignored the >+ actual selection length since X11R4. >+ >+ <li>fixes for fontsize changes with <code>-fa</code> option (Redhat >+ Bugzilla #222340). >+</ul> >+ > <H1><A NAME="xterm_223">Patch #223 - 2006/11/30</A></H1> > <ul> > <li>add <code>--enable-rectangles</code> configure option (request by
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 222340
: 145764