Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: this is weird



On Mon, 25 May 1998, Stephen J. Turnbull wrote:

> >>>>> "Andrew" == Andrew S Howell <andy@example.com> writes:
> 
> >>>>> "Scott" == Scott Stone <sstone@example.com> writes:
> 
>     Scott> Why is it an insanely non-trivial task to set the titlebar
>     Scott> text of a window in X?  I'm using a library which does not
>     Scott> use Xt, or Tk, or Motif.  Basically it does:
> 
> Nothing insane about it.  If you're not going to use Xt, you have to
> do the ICCCM stuff yourself (the app doesn't own the title bar, the
> window manager does).  Interprocess communication is nontrivial.
> 
>     Andrew> 	As Marcus mentioned, you need to do this by way of the
>     Andrew> window manager. The simplest way is to give a -name
>     Andrew> parameter on the command line.
> 
> Not if it's not an Xt app, he doesn't.  It's Xt that supplies the
> -name command line option.

YOu know, it helps me to post these questions to the tlug list, not so
much as for the answers that I get, but for the fact that I always figure
it out myself within 10 minutes of posting the question :)

It turns out to be extremely easy:

char *titletext="My Title";
XTextProperty myTitle;

XStringListToTextProperty(&titletext,1,&myTitle);
XSetWMName(display,window,myTitle);

Guess you just have to know what to look for. :)

--------------------------------------------------
Scott M. Stone <sstone@example.com, sstone@example.com>
               <sstone@example.com>
Linux Developer/Systems Administrator for Pacific HiTech, Inc. 
http://www.pht.com		http://armadillo.pht.co.jp
http://www.pht.co.jp	        http://www.turbolinux.com


--------------------------------------------------------------
Next TLUG Meeting: 13 June Sat, Tokyo Station Yaesu gate 12:30
Featuring Stone and Turnbull on .rpm and .deb packages
Next Nomikai: (?) July, 19:30 Tengu TokyoEkiMae 03-3275-3691
--------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links