while (root && !root->m_desktop)
{
root = root->m_parent;
- if (root)
+ if (!root)
{
/* oops: our root widget does not have a desktop associated.
probably somebody already erased the root, but tries some
m_vis &=~wVisTransparent;
}
+ePoint eWidget::getAbsolutePosition()
+{
+ eWidget *root = this;
+ ePoint abspos = position();
+
+ while (root && !root->m_desktop)
+ {
+ root = root->m_parent;
+ assert(root);
+ abspos += root->position();
+ }
+
+ return abspos;
+}
+
void eWidget::mayKillFocus()
{
setFocus(0);