summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r--src/gui/widgets/window.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 3df552404..f76c5fb9e 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -510,8 +510,10 @@ void Window::setLocationRelativeTo(const Widget *const widget)
if (widget == nullptr)
return;
- int wx, wy;
- int x, y;
+ int wx;
+ int wy;
+ int x;
+ int y;
widget->getAbsolutePosition(wx, wy);
getAbsolutePosition(x, y);
@@ -527,8 +529,10 @@ void Window::setLocationHorisontallyRelativeTo(const Widget *const widget)
if (widget == nullptr)
return;
- int wx, wy;
- int x, y;
+ int wx;
+ int wy;
+ int x;
+ int y;
widget->getAbsolutePosition(wx, wy);
getAbsolutePosition(x, y);