Issue with display of form even when XmNx,XmNy co ordinates are set.

In our application we have a push button on all GUI's whichwhen clicked opens a form with printer details which prints the details on the parent form. All the forms call same function which creates the printer form. So in printerform.uil we have set XmNx, XmNy co ordinates so that the form always opens at only specified co ordinates. But the issue is one form does not open the form at the specified co ordinates and places the printer form at ramdom places . Please help .

code snippet:
Below code is for one of the forms where print form opens at specified co ordinates
Logical SysParamsForm::Print_Callback( const FormEvent& event )
{
Logical s( lFalse );

if ( _FormPtr != ( SysParamsForm* )NULL )
{
s = _FormPtr->initiate_printer_select((const char *) _dplay );
}

if ( s )
{
lock();
}
else
{
unlock();
}

return s;
}

Logical AutoMaintain::Print_CB( const FormEvent& event )
{
if ( _form_ptr != ( AutoMaintain* )NULL )
{
//s = _form_ptr->initiate_printer_select( host_display() );
//s = initiate_confirmation( "Its Create Macro form",host_display() );
s = initiate_printer_select( host_display() );
}

if ( s )
{
lock();
}
else
{
unlock();
}

return s;
}

PrinterForm.uil
object SelectPrinterForm : XmForm {
controls {
XmFrame frame1 ;
};
arguments {
XmNwidth = 550;
XmNheight = 275;
XmNresizePolicy = XmRESIZE_NONE;
XmNautoUnmanage = false;
XmNx=490;
XmNy=210;
};


dpeterc

dpeterc's picture

According to my experience

According to my experience the window placement depends on window manager placement policy, what you specify in x an y is just your desire, and window manager will grant it or not. So any solution you may come op with in client will not be universal, but will depend on window management settings.


archana

archana's picture

Thank you for your reply. I

Thank you for your reply.
I accept that but why is different for only one form while all forms open the printer form at the x,y co ordinates only.
Will widow manager settings vary for each form? can we change the settings? Please help.


fredk

fredk's picture

Set the x and y of the

Set the x and y of the dialog's shell just before you manage the dialog.