Unix Programming - XTerm Decoration Control

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > May 2005 > XTerm Decoration Control





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author XTerm Decoration Control
D-Dog

2005-05-18, 6:03 pm

Hi,
I currently have an application that spins off other applications in
their own xterms. I would like to disable the decorations on the xterm
so that the user will be unable to close the xterm (all this control is
currently done from the master application). I'm using the Motif
Window Manager. I know that these properties can be set in the
..XDefaults file, but then these properties would apply to all xterms,
which I do not want. As a solution I downloaded the xterm-202 freeware
source code. I've compiled it and the application runs like a normal
xterm like I'd expect. Next I went into the code to the location where
it creates the toplevel shell.

toplevel = XtOpenApplicationContext(&app_con, "MyXterm",
optionDescList,
XtNumber(optionDescList),
&argc, argv, fallback_resources,
sessionShellWidgetClass,
NULL, 0);

I figured at this point I could could add a call to

XtVaSetValues(toplevel, XmNmwmDecorations, (MWM_DECOR_TITLE |

WM_DECOR_BORDER),NULL);

to remove all of the decorations from the shell that the xterm runs
from. I'm having no such luck! Any combination I try doesn't seem to
make any difference. I'm able to do something like:

XtVaSetValues(toplevel, XmNtitle, "Test Title", NULL);

And that changes the title fine, but it won't let me mess with the mwm
decorations. I've even renamed the application context to ensure that
there isn't an app-defaults file overriding it.

Any ideas off the top of your heads would be appreciated. This one has
me stumped. I can post more code if necessary.

Thanks!

Dennis

Thomas Dickey

2005-05-18, 8:50 pm

In comp.unix.programmer D-Dog <dquelch@yahoo.com> wrote:
> Hi,
> I currently have an application that spins off other applications in
> their own xterms. I would like to disable the decorations on the xterm
> so that the user will be unable to close the xterm (all this control is
> currently done from the master application). I'm using the Motif
> Window Manager. I know that these properties can be set in the
> .XDefaults file, but then these properties would apply to all xterms,
> which I do not want. As a solution I downloaded the xterm-202 freeware
> source code. I've compiled it and the application runs like a normal
> xterm like I'd expect. Next I went into the code to the location where
> it creates the toplevel shell.


> toplevel = XtOpenApplicationContext(&app_con, "MyXterm",


The second parameter to XtOpenApplicationContent is a class name.
You can set that on the command-line. That's what the uxterm script
does.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com