Hi,
does anybody has any building problems lately?
I have really a strange problem. After installing Ubuntu 10.04 freshly
on my notebook, I can't run a self build nedit binary anymore. The
error message is;
Error: Shell widget nedit has zero width and/or height
The offender is in source/nedit.c:516:
XtRealizeWidget(TheAppShell);
I have tried to reproduce this with a minimal X application (see
attached file), which showed the same error, but than suddenly stopped
to show this error.
Any help would be very appreciated.
Thanks.
Bert
/* -*- c -*- */
#define _GNU_SOURCE
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <math.h>
#include <X11/Intrinsic.h>
#include <X11/Shell.h>
#ifdef WITH_MOTIF
# include <Xm/Xm.h>
# include <Xm/Form.h>
# include <Xm/PushB.h>
#endif
int
main(int ac, char *av[])
{
XtAppContext theAppContext;
Display *theDisplay;
Widget theAppShell;
XtToolkitInitialize();
theAppContext = XtCreateApplicationContext();
theDisplay = XtOpenDisplay(theAppContext, NULL,
"appShell", "AppShell", NULL, 0, &ac, av);
theAppShell = XtAppCreateShell("appShell", "AppShell",
applicationShellWidgetClass, theDisplay, NULL, 0);
XtSetMappedWhenManaged(theAppShell, False);
XtRealizeWidget(theAppShell);
#ifdef WITH_MOTIF
{
Widget shell, form, button;
XmString s1;
Arg args[3];
Cardinal argc = 0;
XtSetArg(args[argc], XmNdeleteResponse, XmDO_NOTHING); argc++;
XtSetArg(args[argc], XmNiconName, "Icon"); argc++;
XtSetArg(args[argc], XmNtitle, "Title"); argc++;
shell = XtCreateWidget("myWindow", topLevelShellWidgetClass,
theAppShell,
args, argc);
form = XtVaCreateManagedWidget("form",
xmFormWidgetClass, shell,
XmNautoUnmanage, False,
XmNresizePolicy, XmRESIZE_NONE,
NULL);
button = XtVaCreateManagedWidget("button",
xmPushButtonWidgetClass, form,
XmNlabelString, s1 = XmStringCreateSimple("Push me!"),
NULL);
XmStringFree(s1);
XtRealizeWidget(shell);
XtMapWidget(shell);
}
#endif
XtAppMainLoop(theAppContext);
return 0;
}
--
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop