(0) NO_I18N_SUPPORT =================== This configuration parameter is eliminated. X11R4 support is retained if X11R4 supports following X11 C-functions: (a) twm.c: XSupportsLocale() (b) util.c: XCreateFontSet() XmbTextExtents() XmbDrawImageString() XmbDrawString() XGetWMName() XmbTextPropertyToTextList() XGetWMIconName() XmbTextPropertyToTextList() Corrected suspected memory leak in I18N_FetchName(), I18N_GetIconName() in util.c. (1) MyFont_ChangeGC =================== Eliminates this function, functionality shifted into MyFont_DrawImageString() and MyFont_DrawString() in util.c. (2) TWM_USE_XFT (Enabled by -DTWM_USE_XFT) ========================================== 'use_fontset' global C variable indicates if Xft functions for UTF8 encoding are to be used instead of iso8859-1. This is set in twm.c according to evaluating setlocale() and XSupportsLocale(). Introduced interface macros DRAW_WIN, DRAW_COL in util.h to compile-time determine Xft and corefont rendering interfaces. Affected functions GetFont(), MyFont_TextWidth(), MyFont_DrawImageString(), MyFont_DrawString() in util.c. Corrected suspected bug in HandleDestroyNotify() regarding destroying a nonexistent 'tmp_win->VirtualDesktopDisplayWindow' in events.c. Xft font specification sample in .vtwmrc -- to be documented (man page): "Bitstream Vera Sans:medium:roman:size=12:antialias=true" Weight is 'light', 'medium', 'demibold', 'bold', 'black'. Slant is 'roman', 'italic', 'oblique'. Size is 'size', 'pixelsize'. Generic faces e.g. at size 10 points: mono-10, sans-10, serif-10. Further reading: Keith Packard: "The Xft font library: architecture and users guide" (3) Spacing (Enabled by -DTWM_USE_SPACING) ========================================== Menu vertical lineskip determined by MenuFont.height and not by MAX(MenuFont.height, MenuTitleFont.height), so is menu title area height. Therefore menu title font should not be significantly bigger than ordinary menu font. Corrected a bug in RedoIconName() in events.c in calculating icon width, icon pixmap und label offsets. (4) TWM_USE_OPACITY (Enabled by -DTWM_USE_OPACITY) ================================================== Prerequisite: xcompmgr (freedesktop.org) is running for transparency drawing. Introduces keywords 'MenuOpacity', 'IconOpacity' taking integer value 0...255 (transparent...opaque) -- to be documented (man page). IconOpacity sets opacity for icons and for the icon manager, MenuOpacity sets opacity for VTWM menus, size/infowindows, virtual desktop, doors. MenuOpacity source code can be used as example how to introduce opacity keywords, e.g. for virtual desktop or doors. As implementation note, opacity is effected by setting the "_NET_WM_WINDOW_OPACITY" atom for respective windows. Client windows setting this atom are intercepted in HandlePropertyNotify() in events.c and this value is propagated then to vtwm-created frame windows. (5) Fixes ========= (a) If MenuTitleFont was .vtwmrc-specified or not was tested by checking if Scr->MenuTitleFont.name is NULL, most notably in menus.c. To avoid these runtime tests MenuTitleFont.name is set to MenuFont.name in CreateFonts() in twm.c prior to loading, if not already set in .vtwmrc (otherwise GetFont() was called with NULL name and caused Xft crash). (b) Don't warp mouse to another screen if executing some functions under XGrabPointer(). Window move, resize operations (maybe others?) need forced staying on the screen of function execution though. (See ExecuteFunction() in menus.c) (c) Don't unhighlight iconmanager client label if entering another screen in HandleEnterNotify() in events.c, it is already unhighlighted and only causes an X11-protocol error while drawing with a GC of a wrong screen. (d) SetFocus() in util.c lacks 'Scr' null-pointer test in TRACE-enclosed code (affected are notably f.quit, f.restart). (6) SloppyFocus (Enabled by -DTWM_USE_SLOPPYFOCUS) ================================================== [To be documented (man page)] Moved f.focus/F_FOCUS functionality in ExecuteFunction() into FocusOnWindow() in menus.c and used in HandleEnterNotify() in events.c for SloppyFocus. SloppyFocus is implemented as a global C variable having initial value FALSE (.vtwmrc variable 'SloppyFocus' sets initial value to TRUE). During runtime f.focus/f.unfocus set SloppyFocus to FALSE, f.sloppyfocus sets SloppyFocus to TRUE. SloppyFocus assigns focus to some client window if one is entered. If iconmanager is entered, the corresponding client, if mapped, is assigned focus; if the client is not mapped (iconified, unmapped) then the 'PointerRoot' X11-focus mode is restored (no window is explicitly assigned X11 focus). (7) Improvements ================ [To be documented (man page)] (a) WarpToTransients has effect only if the corresponding client already has focus. (add_window.c) (b) Warp cursor into a newly appearing client if either WarpCursor is set or it is listed in the WarpCursor-list. (Until now WarpCursor only warps while deiconifying.) (add_window.c) (8) Appearance ============== (a) SizeWindow, InfoWindow, menu border width tied to 'BorderWidth'. (b) Draw menu title separator only if menu has borders or bevels. (c) Add icon name to f.identify while presented in InfoWindow. (d) Restored twm's original siconify_bits[] Bitmap logo in DrawXLogoImage() in util.c if logo size not greater than this original bitmap. Otherwise XmuDrawLogo() is used (which is probably stale code as of now). (e) 'DefaultFont' keyword introduced -- to be documented (man page). DefaultFont is used if TWM_USE_XFT is not defined and 'use_fontset' is 'false' (no locale set?). (Current Xft implementation seemingly never fails while loading TTF fonts, so the 'fallback' branch in util.c is never reached and therefore DefaultFont is not used if TWM_USE_XFT is defined.)