TWM: truetype support

Eeri Kask Eeri.Kask at
Tue Nov 6 16:03:06 PST 2007

Hello twm users,

let me kindly present recent advancements done to the twm window
manager.  Attached is a tar file containing the following tar files:

(1) twm-1.0.3-diff1.MyFont_ChangeGC.tgz

This patchset is the only one having not changed since last time.

(2) twm-1.0.3-diff2.TWM_USE_XFT.tgz

Here I owe Marc Aurele La France on the XFree86 developers list a very
special thank you for taking the time and rigorously reviewing the Xft
port, and for disclosing memory leaking problems; I have corrected all
these having his patches as a guide.

(3) twm-1.0.3-diff3.Spacing.tgz

Spacing corrections are now enclosed in
'#ifdef TWM_USE_XFT /*spacing*/' as they mostly make sense in
combination with Xft vector-scalable fonts.

(4) twm-1.0.3-diff4.TWM_USE_OPACITY.tgz

Window transparency got a small update: twm now intercepts
"_NET_WM_WINDOW_OPACITY" XChangeProperty() requests from client windows
and propagates them to the self-created parent frame window.  So small
programs like

    #include <QApplication>
    #include <QPushButton>

    int main (int argc, char *argv[])
        QApplication app (argc, argv);
        QPushButton hello ("Hello world!");
        hello.setWindowOpacity (0.8);;
        return app.exec();

can make use of it, as long as xcompmgr is running in the background and
 'Option "Composite" "Enable"' is set in Extensions section in xorg.conf
(a dummy demo showing this is
Twm menus and the icon manager can make use of transparency using
"MenuOpacity" and "IconOpacity" keywords with an integer 0..255 value.

(5) twm-1.0.3-diff5.Fixes.tgz

Here are bugs (at least of what I believe of being bugs) I found while
digging in twm. Some seem being ages old, in multiscreen configurations
few are even seriously annoying.  I have to admit, coincidentially most
bugs here corrected have in one way or another to do with the icon
manager: be it multicolumn iconmanager width gradual collapse, dead
mouse somewhere on the blank screen without any apparent reason while
executing f.forwiconmgr, mouse being stolen to another screen if
something iconifies there and the like.  Now I have managed to correct
all these while using twm so far.  So if anyone observes some remaining
and I manage to reproduce and understand that bug then I am happily
ready to look at it.  :-)

There are two issues: as the abovementioned xcompgr is running and one
resizes some client window the twm SizeWindow does not appear (at
top-left corner), which is because resizing runs under grabbed server
and xcompmgr then somehow blocks SizeWindow. (If one releases the grab
for a moment in DisplaySize() doing XSync() one has that size window but
twm can be unpredictably confused if something happens to the window
being resized. Therefore obviously no patch for that. :-)

The second remaining issue is the twm function execution mechanism. As
once stated, there is no apparent difference in executing

Function "RaiseNextWindow" {


Function "RaiseNextWindow" {

which is a little unfortunate.

(6) twm-1.0.3-diff6.Improvements.tgz

Here one finds some small usually useful usage improvements, mostly for
iconmanager-aided mouse navigation.

(7) twm-1.0.3-diff7.Appearance.tgz

Iconmanager appearance is the most visible change.  The "DefaultFont"
keyword is introduced here; if not specified twm now resolves and loads
'fixed' as expected as a built-in default.

All in all there is nothing visibly new but client window opacity
requests tracking.  Internally basically all work from last time is
overworked, polished and 'fixes fixed'.

To try it out, take a clean Xorg TWM version 1.0.3 distribution, apply
as many of these patchsets as you find appropriate, and ... enjoy! (Each
patchset is complete in the sense that dependencies go only backwards.)


    Eeri Kask
-------------- next part --------------
A non-text attachment was scrubbed...
Name: twm-1.0.3-diff1-7.tar
Type: application/x-tar
Size: 40960 bytes
Desc: not available
URL: <>

More information about the xorg mailing list