diff options
Diffstat (limited to 'lib/gui/ewidget.cpp')
| -rw-r--r-- | lib/gui/ewidget.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/gui/ewidget.cpp b/lib/gui/ewidget.cpp index ef784997..7c50f4af 100644 --- a/lib/gui/ewidget.cpp +++ b/lib/gui/ewidget.cpp @@ -199,6 +199,21 @@ void eWidget::setTransparent(int transp) 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); |
