mirror of
https://github.com/lubosz/overte.git
synced 2025-08-28 10:16:59 +02:00
Make Window.x and Window.y report top left of drawable area of window
This commit is contained in:
parent
a3c8b2792d
commit
6868ca971f
1 changed files with 4 additions and 2 deletions
|
@ -390,11 +390,13 @@ glm::vec2 WindowScriptingInterface::getDeviceSize() const {
|
|||
}
|
||||
|
||||
int WindowScriptingInterface::getX() {
|
||||
return qApp->getWindow()->x();
|
||||
return qApp->getWindow()->geometry().x();
|
||||
}
|
||||
|
||||
int WindowScriptingInterface::getY() {
|
||||
return qApp->getWindow()->y();
|
||||
auto menu = qApp->getPrimaryMenu();
|
||||
int menuHeight = menu ? menu->geometry().height() : 0;
|
||||
return qApp->getWindow()->geometry().y() + menuHeight;
|
||||
}
|
||||
|
||||
void WindowScriptingInterface::onWindowGeometryChanged(const QRect& windowGeometry) {
|
||||
|
|
Loading…
Reference in a new issue