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

Re: Problem with repeated opening of dialog in V application

I again address the about one year old problem, see Sven Jonsson, July

I'd also prefer openmotif-2.1.30 to 3D-Athena (since the latter produces
a poor V look for our CalderaOpenLinux, which is a well known behaviour,
see vref.pdf).

I tested V1.25 and V1.22 with openmotif-2.1.30 and I found the same
behaviour as Sven one year ago: A dialog can be diplayed once, if it is
closed (e.g. M_OK),
it seems that it can't be displayed a second time.

I feel from my experiments, that this is more a V bug than a openmotif

It seems that the dialog *is* displayed the second time also, since
IsDisplayed() yields correct values:
false (0) after M_OK,
true  (1) after 2nd ShowDialog()
I feel the problem is, that the dialog is diplayed the 2nd time outside
the visible screen, due to a bug in
SetDialogPosition() and/or GetPosition() which is likely also present in
the Athena version (but less dangerous).

I tried the test program *vtestlib* (V1.25), which provides the
information (left, top, width and height) for the Main Window and the
Dialog (rightmost cmdw button "Dialog"):

The button tries to place the Dialog just 10 pixel to the right and 5
pixel below the main window: vtcmdwin.cpp:

curDialog->ShowDialog("This is a simple modeless dialog.");
int l,t,w,h;
GetPosition(l,t,w,h);	// get positon of main window


The *Athena* version allways positions the dialog correct, but the
Dialog (l,t)-values seem to be nonsens:
Main   l,t,w,h: 283,49,736,428 (seems ok.)
Dialog l,t,w,h: 332,108,563,311(1st time, ->default M_OK)
Main   l,t,w,h: 283,49,736,428
Dialog l,t,w,h: 374,132,563,311(2nd time)

GetPosition() yields other values, although the visible position of the
dialog is the same at the 2nd time.

The *Motif* version yields:
Main   l,t,w,h: 281,49,738,471, (seems ok. again)
Dialog l,t,w,h: 4,373,521,345 (1st time, ->default M_OK)
Main   l,t,w,h: 281,49,738,471,
Dialog l,t,w,h: 291,525,521,345 (2nd time, not visible!)

I guess all the currDialog->GetPosition() l,t values are nonsens, even
for the Athena version. However, they are *set* correct in the Athena
version, but *set* wrong in the Motif version.

Does anyone have a running openmotif vtestlib without this bug? Does
anyone has a fix?

Stephan Uhlemann

Reply to: