Showing the changes to interface/src/ui/InteractiveWindow.cpp (1 of 2 files). Show all
Unified · Split
| @@ -453,25 +453,6 @@ void InteractiveWindow::setPosition(const glm::vec2& position) { · 452 unmodified lines | ||
| 453 | 453 | } |
| 454 | 454 | } |
| 455 | 455 | |
| 456 | −void InteractiveWindow::setNativeWindowPosition(const glm::vec2& position) { | |
| 457 | − if (!_qmlWindowProxy) { | |
| 458 | − return; | |
| 459 | − } | |
| 460 | − | |
| 461 | − auto qmlWindow = _qmlWindowProxy->getQmlWindow(); | |
| 462 | − | |
| 463 | − if (!qmlWindow) { | |
| 464 | − return; | |
| 465 | − } | |
| 466 | − const auto nativeWindowProperty = qmlWindow->property("nativeWindow"); | |
| 467 | − if (nativeWindowProperty.isNull() || !nativeWindowProperty.isValid()) { | |
| 468 | − return; | |
| 469 | − } | |
| 470 | − const auto nativeWindow = qvariant_cast<QQuickWindow*>(nativeWindowProperty); | |
| 471 | − | |
| 472 | − nativeWindow->setPosition(QPoint(position.x, position.y)); | |
| 473 | −} | |
| 474 | − | |
| 475 | 456 | RelativePositionAnchor InteractiveWindow::getRelativePositionAnchor() const { |
| 476 | 457 | return _relativePositionAnchor; |
| 477 | 458 | } |
| @@ -524,14 +505,14 @@ void InteractiveWindow::setPositionUsingRelativePositionAndAnchor(const QRect& m · 46 unmodified lines | ||
| 524 | 505 | QMetaObject::invokeMethod(_qmlWindowProxy.get(), "writeProperty", Q_ARG(QString, INTERACTIVE_WINDOW_POSITION_PROPERTY), |
| 525 | 506 | Q_ARG(QVariant, QPointF(newPosition.x, newPosition.y))); |
| 526 | 507 | } |
| 527 | − setNativeWindowPosition(newPosition); | |
| 508 | + setPosition(newPosition); | |
| 528 | 509 | } |
| 529 | 510 | |
| 530 | 511 | void InteractiveWindow::repositionAndResizeFullScreenWindow() { |
| 531 | 512 | QRect windowGeometry = qApp->getWindow()->geometry(); |
| 532 | 513 | |
| 533 | − setNativeWindowPosition(glm::vec2(windowGeometry.x(), windowGeometry.y())); | |
| 534 | − setNativeWindowSize(glm::vec2(windowGeometry.width(), windowGeometry.height())); | |
| 514 | + setPosition(glm::vec2(windowGeometry.x(), windowGeometry.y())); | |
| 515 | + setSize(glm::vec2(windowGeometry.width(), windowGeometry.height())); | |
| 535 | 516 | } |
| 536 | 517 | |
| 537 | 518 | glm::vec2 InteractiveWindow::getSize() const { |
| @@ -550,26 +531,6 @@ void InteractiveWindow::setSize(const glm::vec2& size) { · 12 unmodified lines | ||
| 550 | 531 | } |
| 551 | 532 | } |
| 552 | 533 | |
| 553 | −void InteractiveWindow::setNativeWindowSize(const glm::vec2& size) { | |
| 554 | − if (!_qmlWindowProxy) { | |
| 555 | − return; | |
| 556 | − } | |
| 557 | − | |
| 558 | − auto qmlWindow = _qmlWindowProxy->getQmlWindow(); | |
| 559 | − | |
| 560 | − if (!qmlWindow) { | |
| 561 | − return; | |
| 562 | − } | |
| 563 | − const auto nativeWindowProperty = qmlWindow->property("nativeWindow"); | |
| 564 | − if (nativeWindowProperty.isNull() || !nativeWindowProperty.isValid()) { | |
| 565 | − return; | |
| 566 | − } | |
| 567 | − const auto nativeWindow = qvariant_cast<QQuickWindow*>(nativeWindowProperty); | |
| 568 | − | |
| 569 | − nativeWindow->setWidth(size.x); | |
| 570 | − nativeWindow->setHeight(size.y); | |
| 571 | −} | |
| 572 | − | |
| 573 | 534 | QString InteractiveWindow::getTitle() const { |
| 574 | 535 | if (!_qmlWindowProxy) { |
| 575 | 536 | return QString(); |