When using Lesstif 0.93.18 (but also other versions) I encounter then
following problem:
After creating a popupmenu I want to display it at position (100, 100) (or
whatever other position).
But it is alway displayed at (0, 0).
After creation of the popupmenu then next statements are executed:
hPMenu = create(notifier->topWin, 0, TRUE);
if (this->hPMenu == 0)
{
return;
}
int x = 100;
int y = 100;
XtVaSetValues(hPMenu, XmNx, x, XmNy, y,
XmNwhichButton, 3, 0);
XtManageChild(this->hPMenu);
After the XtVaSetValues statement hPMenu contains the following:
core = {self = 0x8136e78,
widget_class = 0x4018d040,
parent = 0x8136c30,
xrm_name = 1232,
being_destroyed = 0 '\000',
destroy_callbacks = 0x0,
constraints = 0x0,
x = 100,
y = 100,
width = 87,
height = 69,
border_width = 0,
managed = 0 '\000',
sensitive = 1 '\001',
ancestor_sensitive = 1 '\001',
event_table = 0x81379f0,
tm = { translations = 0x8132098,
proc_table = 0x8137030,
current_state = 0x0,
lastEventTime = 0
},
accelerators = 0x0,
border_pixel = 0,
border_pixmap = 2,
popup_list = 0x0,
num_popups = 0,
name = 0x812d5f8 "Popopmenu",
screen = 0x811b1f0,
colormap = 36,
window = 33554464,
depth = 24,
background_pixel = 16752498,
background_pixmap = 2,
visible = 1 '\001',
mapped_when_managed = 1 '\001'
When calling XtManageChild, I see the contents is changing to:
core = {self = 0x8136e78,
widget_class = 0x4018d040,
parent = 0x8136c30,
xrm_name = 1232,
being_destroyed = 0 '\000',
destroy_callbacks = 0x0,
constraints = 0x0,
x = 0,
y = 0,
width = 87,
height = 69,
border_width = 0,
managed = 1 '\001',
sensitive = 1 '\001',
ancestor_sensitive = 1 '\001',
event_table = 0x81379f0,
tm = { translations = 0x8132098,
proc_table = 0x8137030,
current_state = 0x0,
lastEventTime = 0
},
accelerators = 0x0,
border_pixel = 0,
border_pixmap = 2,
popup_list = 0x0,
num_popups = 0,
name = 0x812d5f8 "Popopmenu",
screen = 0x811b1f0,
colormap = 36,
window = 33554464,
depth = 24,
background_pixel = 16752498,
background_pixmap = 2,
visible = 1 '\001',
mapped_when_managed = 1 '\001'
See what has happend with the values of x and y.
I don't see this behaviour when using OSF/Motif on Dec Alpha, Sun or Linux
with OpenMotif.
Every suggestion or explanation is welcome.
Luuk Kuiper
HITT Holland Institute of Traffic Technology B.V.
P.O. Box 717, 7300 AS Apeldoorn, The Netherlands
Oude Apeldoornseweg 41-45, Bldg Y, 7333 NR Apeldoorn, The Netherlands
Phone: +31.55.543.2526
Fax: +31.55.543.2568 / +31.55.543.2553
E-mail: [EMAIL PROTECTED]
World Wide Web: http://www.hitt.nl
_______________________________________________
Lesstif mailing list
[EMAIL PROTECTED]
https://terror.hungry.com/mailman/listinfo/lesstif