This is normal. This is from "man XtAppInitialize" :
DESCRIPTION
The XtAppInitialize function calls XtToolkitInitialize followed by
XtCreateApplica�
tionContext, then calls XtOpenDisplay with display_string NULL and
application_name
NULL, and finally calls XtAppCreateShell with application_name NULL,
widget_class
applicationShellWidgetClass, and the specified args and num_args and
returns the
created shell.
When you call XtAppInitialize, you're creating an applicationShell,
in the other case you're using a topLevelShell.
Quitting the application on the occasion that you describe is the main
difference between those two widget classes.
You can replace your XtVaOpenApplication call with one that uses
applicationShellWidgetClass and obtain the other result.
Danny
Philippe Bastiani wrote:
>
> Hi,
>
> 1/ The following program with XtVaOpenApplication produce a warning;
> and, it does not exit with the Close command of fvwm:
> "Warning: XtRemoveGrab asked to remove a widget not on the list"
>
> 2/ The same test with XtAppInitialize works fine...
>
> int main (int argc, char** argv)
> {
> Widget toplevel,too;
> XtAppContext app;
> // First case (remove XtAppInitialize)
> toplevel = XtVaOpenApplication(&app,"Hello",NULL, 0,&argc,
> argv,NULL,topLevelShellWidgetClass,NULL );
> // Second case (remove XtVaOpenApplication)
> toplevel = XtAppInitialize ( &app, "Hello", NULL, 0, &argc, argv, NULL,
> NULL, 0 );
>
> too = XtCreateManagedWidget("MyWindow", xmMainWindowWidgetClass, toplevel,
> NULL, 0);
>
> XtRealizeWidget ( toplevel );
> XtAppMainLoop ( app );
> }
>
> NB: cheched with Lesstif 0.93.18-3, Cygwin/Xfree and fvwm2 2.4.7-2...
>
> a+
> Philippe
>
> _______________________________________________
> Lesstif mailing list
> [EMAIL PROTECTED]
> https://terror.hungry.com/mailman/listinfo/lesstif
--
Danny Backx ([EMAIL PROTECTED] [EMAIL PROTECTED])
Home page : http://users.skynet.be/danny.backx
Projects: LessTif (http://lesstif.sourceforge.net)
Xbae (http://xbae.sourceforge.net)
_______________________________________________
Lesstif mailing list
[EMAIL PROTECTED]
https://terror.hungry.com/mailman/listinfo/lesstif