[PATCH] Fix (hack?) for title names not changing on extASCII

Patches that users have written with discussions about them. Might be useful as the counterpart to Feature Requests.
Austinight
Kitten
Kitten
Posts: 1
Joined: Wed Jul 31, 2013 9:30 pm

[PATCH] Fix (hack?) for title names not changing on extASCII

Postby Austinight » Wed Jul 31, 2013 9:55 pm

This is a fix/hack to fvwm-2.6.5 for an issue reported in 2006 at:

www.thecadforums.com/cadence/35077-wind ... issue.html

There the program, Cadence's Virtuoso IC Layout Suite, was tacking on an extended-ASCII copyright symbol after their name. This cuteness stopped the title bar (and subsequent window lists, etc.) from updating to match the window name, thus frustrating users who had several windows from the tool open at once. They couldn't figure out which WinList/IconList entry mapped to what window.

The fix (really a hack) is to strip extended-ASCII from the title string (converting them to spaces, 0x20) before saving it in the fw->name.name string. The following code was added into three sites in the code:

1.) fvwm/ewmh_names.c, line 248

char *c = tmp_str - 1;
while( *++c ) if ( *c & 0x80 ) *c = 0x20;

2.) fvwm/events.c, line 3353

char *c = new_name.name - 1;
while( *++c ) if ( *c & 0x80 ) *c = 0x20;

3.) fvwm/add_window.c, line 1740

char *c = fw->name.name - 1;
while( *++c ) if ( *c & 0x80 ) *c = 0x20;

Only #1 is required to fix the bug as reported, but the other sites were patched for cleanliness. There are optimizations in the code that look for name changes. To ensure these continue to work as intended, I didn't want to patch code paths to setting names at one place but not all.

KDE, Gnome, and XFCE all can handle the extended-ASCII format in title bars. Adding extended-ASCII support is a *FAR* better path to fixing this permanently, but no doubt much more complicated. This at least gets people working with the regular ASCII portion of the window title displayed properly.

Thanx,

-A

Return to “Patches”

Who is online

Users browsing this forum: No registered users and 1 guest