summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r--src/widgets/widgets/qcombobox.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 272032d76f..0dde839629 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -2741,6 +2741,22 @@ void QComboBox::showPopup()
bool startTimer = !container->isVisible();
container->raise();
+ container->create();
+ QWindow *containerWindow = container->window()->windowHandle();
+ if (containerWindow) {
+ QWindow *win = window()->windowHandle();
+ if (win) {
+ QScreen *currentScreen = win->screen();
+ if (currentScreen && !currentScreen->virtualSiblings().contains(containerWindow->screen())) {
+ containerWindow->setScreen(currentScreen);
+
+ // This seems to workaround an issue in xcb+multi GPU+multiscreen
+ // environment where the window might not always show up when screen
+ // is changed.
+ container->hide();
+ }
+ }
+ }
container->show();
container->updateScrollers();
view()->setFocus();