2015年12月10日 I've succeeded to make fvwm-1.24r working fine with ja_JP.UTF-8 locale [長年日記]
_ I've succeeded to make fvwm-1.24r working fine with ja_JP.UTF-8 locale
Get base source from Debian's site
Get fvwm1_1.24r.orig.tar.gz and fvwm1_1.24r-56.diff.gz from Debian's site :)
$ tar xvzf fvwm1_1.24r.orig.tar.gz $ cd fvwm1-1.24r.orig/ $ zcat ../fvwm1_1.24r-56.diff.gz | patch -p1 $ patch -p1 <debian/i18n.patch
Patch to disable librplay
I don't have librplay in my system, so disable it. If you have librplay, ignore this patch :P
$ cat ../fvwm1_1.24r-56-1.diff | patch -p0
fvwm1_1.24r-56-1.diff
*** modules/FvwmAudio/Imakefile.ORG 2015-12-02 10:46:14.031822333 +0900 --- modules/FvwmAudio/Imakefile 2015-12-02 10:46:34.219569951 +0900 *************** *** 10,17 **** * are correct for your rplay installation. */ #define HAVE_RPLAY ! #ifdef HAVE_RPLAY AUDIO_DEFINES = -DHAVE_RPLAY --- 10,18 ---- * are correct for your rplay installation. */ + #if 0 #define HAVE_RPLAY ! #endif #ifdef HAVE_RPLAY AUDIO_DEFINES = -DHAVE_RPLAY
Patch to enable I18N
I18N of Debian's fvwm1 is disabled to avoid a trouble about UTF-8 locale :(
Enable it :)
$ cat ../fvwm1_1.24r-56-2.diff | patch -p0
fvwm1_1.24r-56-2.diff
*** configure.h.ORG 2015-12-02 10:59:17.825023569 +0900 --- configure.h 2015-12-02 10:59:31.210856224 +0900 *************** *** 64,69 **** --- 64,70 ---- * If you want to use i18n feature, specify #define I18N ***************************************************************************/ /* #define I18N */ + #define I18N /*************************************************************************** *#define M4
Patch to make fvwm-1.24r to work fine with ja_JP.UTF-8 locale :)
Font setting by XCreateGC with ja_JP.UTF-8 locale must fail(I don't know why). So I stop it. Of course, this way may cause unexpected effect, but I don't care :P
$ cat ../fvwm1_1.24r-56-3.diff | patch -p0
fvwm1_1.24r-56-3.diff
*** ./modules/FvwmIconBox/FvwmIconBox.c.ORG 2015-12-09 15:24:04.410373438 +0900 --- ./modules/FvwmIconBox/FvwmIconBox.c 2015-12-09 15:24:22.327149447 +0900 *************** *** 1056,1062 **** gcv.background = icon_back_pix; IconShadowGC = XCreateGC(dpy, Root, gcm, &gcv); ! gcm = GCForeground|GCBackground|GCFont; gcv.foreground = fore_pix; gcv.background = back_pix; gcv.font = font->fid; --- 1056,1062 ---- gcv.background = icon_back_pix; IconShadowGC = XCreateGC(dpy, Root, gcm, &gcv); ! gcm = GCForeground|GCBackground/* |GCFont */; gcv.foreground = fore_pix; gcv.background = back_pix; gcv.font = font->fid; *** ./modules/FvwmIdent/FvwmIdent.c.ORG 2015-12-09 15:24:32.972016368 +0900 --- ./modules/FvwmIdent/FvwmIdent.c 2015-12-09 15:24:48.383823694 +0900 *************** *** 456,462 **** XSelectInput(dpy,main_win,MW_EVENTS); change_window_name(&MyName[1]); ! gcm = GCForeground|GCBackground|GCFont; gcv.foreground = fore_pix; gcv.background = back_pix; gcv.font = font->fid; --- 456,462 ---- XSelectInput(dpy,main_win,MW_EVENTS); change_window_name(&MyName[1]); ! gcm = GCForeground|GCBackground/* |GCFont */; gcv.foreground = fore_pix; gcv.background = back_pix; gcv.font = font->fid; *** ./modules/FvwmPager/x_pager.c.ORG 2015-12-09 15:24:59.594683539 +0900 --- ./modules/FvwmPager/x_pager.c 2015-12-09 15:25:18.115451998 +0900 *************** *** 393,399 **** } XMapRaised(dpy,Scr.Pager_w); ! gcm = GCForeground|GCBackground|GCFont; gcv.foreground = fore_pix; gcv.background = back_pix; --- 393,399 ---- } XMapRaised(dpy,Scr.Pager_w); ! gcm = GCForeground|GCBackground/* |GCFont */; gcv.foreground = fore_pix; gcv.background = back_pix; *** ./modules/FvwmWinList/FvwmWinList.c.ORG 2015-12-09 15:25:31.115289477 +0900 --- ./modules/FvwmWinList/FvwmWinList.c 2015-12-09 15:25:45.232112993 +0900 *************** *** 689,695 **** gcval.foreground=fore; gcval.background=back; gcval.font=ButtonFont->fid; ! gcmask=GCForeground|GCBackground|GCFont; graph=XCreateGC(dpy,Root,gcmask,&gcval); if(d_depth < 2) --- 689,695 ---- gcval.foreground=fore; gcval.background=back; gcval.font=ButtonFont->fid; ! gcmask=GCForeground|GCBackground/* |GCFont */; graph=XCreateGC(dpy,Root,gcmask,&gcval); if(d_depth < 2) *** ./modules/GoodStuff/GoodStuff.c.ORG 2015-12-09 15:25:57.129964249 +0900 --- ./modules/GoodStuff/GoodStuff.c 2015-12-09 15:26:10.506797016 +0900 *************** *** 834,840 **** gcv.background = back_pix; ShadowGC = XCreateGC(dpy, Root, gcm, &gcv); ! gcm = GCForeground|GCBackground|GCFont; gcv.foreground = fore_pix; gcv.background = back_pix; gcv.font = font->fid; --- 834,840 ---- gcv.background = back_pix; ShadowGC = XCreateGC(dpy, Root, gcm, &gcv); ! gcm = GCForeground|GCBackground/* |GCFont */; gcv.foreground = fore_pix; gcv.background = back_pix; gcv.font = font->fid; *** ./fvwm/configure.c.ORG 2015-12-09 15:21:08.980566612 +0900 --- ./fvwm/configure.c 2015-12-09 15:23:12.215025970 +0900 *************** *** 1833,1839 **** Scr.DrawGC = XCreateGC(dpy, Scr.Root, gcm, &gcv); gcm = GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground| ! GCBackground|GCFont; gcv.line_width = 0; gcv.function = GXcopy; gcv.plane_mask = AllPlanes; --- 1833,1839 ---- Scr.DrawGC = XCreateGC(dpy, Scr.Root, gcm, &gcv); gcm = GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground| ! GCBackground/* |GCFont */; gcv.line_width = 0; gcv.function = GXcopy; gcv.plane_mask = AllPlanes; *************** *** 1854,1865 **** gcv.fill_style = FillStippled; gcv.stipple = Scr.gray_bitmap; gcm = GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground| ! GCBackground|GCFont|GCStipple|GCFillStyle; Scr.StippleGC = XCreateGC(dpy, Scr.Root, gcm, &gcv); gcm = GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground| ! GCBackground|GCFont; gcv.foreground = Scr.HiRelief.fore; gcv.background = Scr.HiRelief.back; gcv.fill_style = FillSolid; --- 1854,1865 ---- gcv.fill_style = FillStippled; gcv.stipple = Scr.gray_bitmap; gcm = GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground| ! GCBackground/* |GCFont */|GCStipple|GCFillStyle; Scr.StippleGC = XCreateGC(dpy, Scr.Root, gcm, &gcv); gcm = GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground| ! GCBackground/* |GCFont */; gcv.foreground = Scr.HiRelief.fore; gcv.background = Scr.HiRelief.back; gcv.fill_style = FillSolid; *************** *** 1877,1887 **** gcv.fill_style = FillStippled; gcv.stipple = Scr.gray_bitmap; gcm=GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground| ! GCBackground|GCFont|GCStipple|GCFillStyle; Scr.MenuStippleGC = XCreateGC(dpy, Scr.Root, gcm, &gcv); gcm=GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground| ! GCBackground|GCFont; gcv.fill_style = FillSolid; } else --- 1877,1887 ---- gcv.fill_style = FillStippled; gcv.stipple = Scr.gray_bitmap; gcm=GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground| ! GCBackground/* |GCFont */|GCStipple|GCFillStyle; Scr.MenuStippleGC = XCreateGC(dpy, Scr.Root, gcm, &gcv); gcm=GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground| ! GCBackground/* |GCFont */; gcv.fill_style = FillSolid; } else *** ./fvwm/misc.h.ORG 2015-12-09 15:23:23.833880714 +0900 --- ./fvwm/misc.h 2015-12-09 15:23:50.353549172 +0900 *************** *** 96,102 **** Globalgcv.font = newfont;\ Globalgcv.foreground = color;\ Globalgcv.background = backcolor;\ ! Globalgcm = GCFont | GCForeground | GCBackground; \ XChangeGC(dpy,Scr.FontGC,Globalgcm,&Globalgcv); \ } #ifdef I18N --- 96,102 ---- Globalgcv.font = newfont;\ Globalgcv.foreground = color;\ Globalgcv.background = backcolor;\ ! Globalgcm = /* GCFont | */GCForeground | GCBackground; \ XChangeGC(dpy,Scr.FontGC,Globalgcm,&Globalgcv); \ } #ifdef I18N
Patch to fix problem about resize and move
Adjust virtical position for text drawing in moving and resizing window.
$ cat ../fvwm1_1.24r-56-4.diff | patch -p0
fvwm1_1.24r-56-4.diff
*** ./fvwm/resize.c.ORG 2015-12-10 01:24:12.408041411 +0900 --- ./fvwm/resize.c 2015-12-10 01:25:18.327419423 +0900 *************** *** 457,465 **** #undef FONTSET #define FONTSET Scr.StdFont.fontset XDrawString (dpy, Scr.SizeWindow, Scr.NormalGC, offset, Scr.StdFont.font->ascent + SIZE_VINDENT, str, 13); ! } /*********************************************************************** --- 457,469 ---- #undef FONTSET #define FONTSET Scr.StdFont.fontset + #if 0 XDrawString (dpy, Scr.SizeWindow, Scr.NormalGC, offset, Scr.StdFont.font->ascent + SIZE_VINDENT, str, 13); ! #else ! XDrawString (dpy, Scr.SizeWindow, Scr.NormalGC, ! offset, Scr.StdFont.y + SIZE_VINDENT, str, 13); ! #endif } /*********************************************************************** *** ./fvwm/move.c.ORG 2015-12-10 01:20:49.885301811 +0900 --- ./fvwm/move.c 2015-12-10 01:21:05.863332536 +0900 *************** *** 337,346 **** --- 337,353 ---- - XTextWidth(Scr.StdFont.font,str,strlen(str)))/2; #undef FONTSET #define FONTSET Scr.StdFont.fontset + #if 0 XDrawString (dpy, Scr.SizeWindow, Scr.NormalGC, offset, Scr.StdFont.font->ascent + SIZE_VINDENT, str, strlen(str)); + #else + XDrawString (dpy, Scr.SizeWindow, Scr.NormalGC, + offset, + Scr.StdFont.y + SIZE_VINDENT, + str, strlen(str)); + #endif }
Build
$ xmkmf $ make Makefiles && make all
Install
# make install # make install.man # cp fvwm_icons/*.xpm /usr/include/X11/pixmaps/ # cp fvwm_icons/*.xbm /usr/include/X11/bitmaps/ # cp fvwm_icons/*.bitmap /usr/include/X11/bitmaps/ # cp fvwm_icons/*.icon /usr/include/X11/bitmaps/