Skip to content

Commit a7ac98c

Browse files
Merge pull request #29387 from Eism/score_text_edit_fix
fixed #29162: Shift+arrow selection of text broken in Linux
2 parents 068cd81 + 83704d6 commit a7ac98c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/framework/uicomponents/view/popupwindow/popupwindow_qquickview.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,16 @@ void PopupWindow_QQuickView::init(QQmlEngine* engine, bool isDialogMode, bool is
8787
}
8888
// popup
8989
else {
90-
Qt::WindowFlags flags(
91-
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
92-
Qt::Popup // Popups can't be Qt::Tool on Linux Wayland, or they can't be relatvely positioned.
93-
#else
94-
Qt::Tool
95-
#endif
96-
| Qt::FramelessWindowHint // Without border
97-
| Qt::NoDropShadowWindowHint // Without system shadow
98-
| Qt::BypassWindowManagerHint // Otherwise, it does not work correctly on Gnome (Linux) when resizing)
99-
);
90+
Qt::WindowFlags flags;
91+
if (qGuiApp->platformName().contains("wayland")) {
92+
flags = Qt::Popup;
93+
} else {
94+
flags = Qt::Tool;
95+
}
96+
97+
flags |= Qt::FramelessWindowHint // Without border
98+
| Qt::NoDropShadowWindowHint // Without system shadow
99+
| Qt::BypassWindowManagerHint; // Otherwise, it does not work correctly on Gnome (Linux) when resizing)
100100

101101
m_view->setFlags(flags);
102102
m_view->setColor(QColor(Qt::transparent));

0 commit comments

Comments
 (0)