Eeri Kask wrote:
> This means, any performance degrading or huge memory footprint you are
> going to observe from now on will hopefully reveal problems only in the
> xft-subsystem and not in twm.

Xft has disclosed probably a very old bug in twm!  :-)
(Drawing with a current screen GC onto a 'noncurrent' screen.)


Here are patchsets (against Xorg twm release 1.0.3) completing and
polishing Xft support for twm (and improving the icon manager):


(1) twm-1.0.3-diff1.MyFont_ChangeGC.tgz
to my knowing has not changed from last time: cleans up bitmap font drawing.


(2) twm-1.0.3-diff2.TWM_USE_XFT.tgz
introduces Xft support (replaces bitmap text rendering functions with
xft-font rendering). [Compile with -DTWM_USE_XFT to activate.]


(3) twm-1.0.3-diff3.Spacing.tgz
(Vertical) spacing corrections; having scalable fonts one should use
"scalable spacing" as well, otherwise one day having 600x600 dpi screen
vertical spacing of, e.g. 4 pixels, results in text line distance of
zero. Now baseline skip is computed like 1.2 times font height or something.

Maybe here some spacing corrections need to be done as some ttf-fonts
may include "bad metrics". I have mostly tested with bitstream vera
fonts.  (E.g. Apple's Lucida Grande looks vertically definitely too tight.)


(4) twm-1.0.3-diff4.TWM_USE_OPACITY.tgz
If you value transparency in twm menus and icon manger/icons, apply
this. This patchset introduces "MenuOpacity" and "IconOpacity" keywords
having integer values in range 0...255. [Enable with -DTWM_USE_OPACITY]


(5) twm-1.0.3-diff5.Appearance.tgz
Here lies probably the most radical change I have made to twm: the
iconmanager painting DrawIconManagerBorder() is now
DrawIconManagerEntry() and draws the iconmanager entry in full. This
work is not completed yet. This patchset introduces "DefaultFont"
keyword. The default font was up to now like some orphan parameter not
configurable by the user and in the same time used prominently in
rendering InfoWindow/SizeWindow text. (Letting it be "fixed" as in
bitmap rendering would cause twm become non-usable in whole as
XftFontOpenXlfd() (at least the installed library I have to use) is not
able to load that font, so something needed to be done anyway. Lacking
any better idea now by default DefaultFont is set to "mono-10" if XFT is
compiled in.)


(6) twm-1.0.3-diff6.Fixes.tgz
Here are bugs I encountered in twm as improving icon manager
functionality; some are serious.


(7) twm-1.0.3-diff7.Improvements.tgz
Here are some improvements to the icon manager. The old behaviour is
kept as long as "WarpCursor" is not defined: actually the meaning of
this variable is broadened in the sense that everywhere where warping
mouse makes sense, this is done:

(*) if some client window has focus and this client opens a transient
window, then mouse is transfered there; like in password prompt and
file-open dialogs (this is a valuable idea from vtwm);

(*) if iconifying some client window and the icon manager is currently
mapped, the mouse is transfered into the corresponding icon manager entry;

(*) if executing f.hideiconmgr transfer mouse into the corresponding
client if some iconmanager entry was "active".

(*) iconmanager navigation functions raise the corresponding client
windows as stepping around entries.


These are the most important modifications I feeled necessary to turn
the icon manager --- mostly by popping it on and off on demand --- into
a useful tool for keyboard-driven focus and mouse navigation along
client windows. Please let me know if you have problems, differing
preferences or further good ideas regarding this.

As further work the icon manager has few bugs remaining I have observed
but not yet investigated (some occurring in multiscreen environments).

How it now looks like you can see at

    www.inf.tu-dresden.de/~ek1/TheGIMP-iconmgr-screenshot.png

(Btw. menutitle is painted with titlebar font (as a menu-title-bar), not
included in the patches. There are some font height issues to be decided
regarding this in order to make it 'failsafe'.)


Greetings, and have fun,

    Eeri Kask

P.S. If you don't mind tweaking in these patches, then please help test
diff7, diff6 and diff5 first. :-)  I'll consider diff1...diff4 finished
if no bugs (and needed spacing corrections) become apparent.

P.P.S. How to put TWM_USE_XFT, TWM_USE_OPACITY into autoconfig or Imake
if you are interested please kindly help as not coming from software
development it is a little complicated. (Few weeks ago I only learned
how to use 'diff'.)  :-)

Attachment: twm-1.0.3-diff1.MyFont_ChangeGC.tgz
Description: application/compressed-tar

Attachment: twm-1.0.3-diff2.TWM_USE_XFT.tgz
Description: application/compressed-tar

Attachment: twm-1.0.3-diff3.Spacing.tgz
Description: application/compressed-tar

Attachment: twm-1.0.3-diff4.TWM_USE_OPACITY.tgz
Description: application/compressed-tar

Attachment: twm-1.0.3-diff5.Appearance.tgz
Description: application/compressed-tar

Attachment: twm-1.0.3-diff6.Fixes.tgz
Description: application/compressed-tar

Attachment: twm-1.0.3-diff7.Improvements.tgz
Description: application/compressed-tar

Reply via email to