Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55008 - xtermTitle() changes window properties, without replacing them.
Summary: xtermTitle() changes window properties, without replacing them.
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-06-24 06:30 UTC by Tavis Ormandy (RETIRED)
Modified: 2004-10-22 08:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Change escape sequence to set WM_ICON_NAME and WM_NAME (set-icon-and-title.diff,425 bytes, patch)
2004-06-25 00:57 UTC, Tavis Ormandy (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tavis Ormandy (RETIRED) gentoo-dev 2004-06-24 06:30:30 UTC
Here is how xtermTitle() is defined:

def xtermTitle(mystr):
    if havecolor and dotitles and os.environ.has_key("TERM"):
        myt=os.environ["TERM"]
        if myt in ["xterm","Eterm","aterm","rxvt","screen"]:
            sys.stderr.write("\x1b]1;\x07\x1b]2;"+str(mystr)+"\x07")
            sys.stderr.flush()

If i break this sequence down:

\x1b]1;\x07

Change the WM_ICON_NAME to NULL.

\x07\x1b]2;"+str(mystr)+"\x07

Change WM_NAME to str(mystr)

So I have to ask, why is the Icon name being removed, and never replaced? If for some reason (IMHO, you should change both) you only want to change the WM_NAME, why remove my WM_ICON_NAME? Even if you are happy with this behaviour, you could at least put it back in xtermTitleReset().

This behaviour is really strange, I dont think I have any other applications that do this, the WM_ICON_NAME property is used by ICCM2 compliant winow managers for short titles for iconified windows, and similar representations, so once I have used emerge in an xterm, iconifying it leaves me with a title-less window!


...
4.1.2.2. WM_ICON_NAME Property
The WM_ICON_NAME property is an uninterpreted string that the client wants to be displayed in association with the window when it is iconified (for example, in an icon label). In other respects, including the type, it is similar to WM_NAME. For obvious geometric reasons, fewer characters will normally be visible in WM_ICON_NAME than WM_NAME.
...


Is it really the intention to set this to NULL?

I would reccoment the following sequence be used instead:

sys.stderr.write("\x1b]0;"+str(mystr)+"\x07")

That's set WM_ICON_NAME and WM_NAME properties to mystr, or alternatively, leave WM_ICON_NAME alone alltogether:

sys.stderr.write("\x1b]2;"+str(mystr)+"\x07")

Only change WM_NAME.
Comment 1 Tavis Ormandy (RETIRED) gentoo-dev 2004-06-25 00:57:51 UTC
Created attachment 34113 [details, diff]
Change escape sequence to set WM_ICON_NAME and WM_NAME

Patch against cvs to fix escape sequence (sets WM_ICON_NAME and WM_NAME).
Comment 2 Tavis Ormandy (RETIRED) gentoo-dev 2004-07-10 10:43:49 UTC
any comments? seems like an easy fix, and this is very annoying on window managers that use the icon name property (like fvwm) :) 
Comment 3 Nicholas Jones (RETIRED) gentoo-dev 2004-09-04 09:18:51 UTC
Sorry, had been neglecting inclusion tags.

Only changing name, in cvs.
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2004-10-22 08:48:04 UTC
Bug has been fixed and released in stable portages on or before 2.0.51-r2