Showing the changes to interface/src/ui/RunningScriptsWidget.cpp (1 of 5 files). Show all
Unified · Split
| @@ -151,27 +151,7 @@ void RunningScriptsWidget::showEvent(QShowEvent* event) { · 150 unmodified lines | ||
| 151 | 151 | ui->filterLineEdit->setFocus(); |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | − QRect parentGeometry = parentWidget()->geometry(); | |
| 155 | − | |
| 156 | − // If our parent window is on the HMD, then don't use it's geometry, instead use | |
| 157 | − // the "main screen" geometry. | |
| 158 | − HMDToolsDialog* hmdTools = Menu::getInstance()->getHMDToolsDialog(); | |
| 159 | − if (hmdTools && hmdTools->hasHMDScreen()) { | |
| 160 | − QScreen* hmdScreen = hmdTools->getHMDScreen(); | |
| 161 | − QWindow* appWindow = parentWidget()->windowHandle(); | |
| 162 | − QScreen* appScreen = appWindow->screen(); | |
| 163 | − | |
| 164 | − // if our app's screen is the hmd screen, we don't want to place the | |
| 165 | − // running scripts widget on it. So we need to pick a better screen. | |
| 166 | − // we will use the screen for the HMDTools since it's a guarenteed | |
| 167 | − // better screen. | |
| 168 | − if (appScreen == hmdScreen) { | |
| 169 | − QScreen* betterScreen = hmdTools->windowHandle()->screen(); | |
| 170 | − parentGeometry = betterScreen->geometry(); | |
| 171 | − } | |
| 172 | − | |
| 173 | − } | |
| 174 | − | |
| 154 | + QRect parentGeometry = Application::getInstance()->getDesirableApplicationGeometry(); | |
| 175 | 155 | int titleBarHeight = UIUtil::getWindowTitleBarHeight(this); |
| 176 | 156 | int menuBarHeight = Menu::getInstance()->geometry().height(); |
| 177 | 157 | int topMargin = titleBarHeight + menuBarHeight; |