Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Integration
Commits
6f6603eb
Commit
6f6603eb
authored
Dec 22, 2020
by
Kai Uwe Broulik
🍇
Browse files
x11integration: Force standalone Qt::Dialog resizable
Because KWin now honors minimize/maximize button hint.
CCBUG: 430666
parent
3196d6f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/platformtheme/x11integration.cpp
View file @
6f6603eb
...
...
@@ -62,6 +62,27 @@ bool X11Integration::eventFilter(QObject *watched, QEvent *event)
QPlatformSurfaceEvent
*
pe
=
static_cast
<
QPlatformSurfaceEvent
*>
(
event
);
if
(
!
w
->
flags
().
testFlag
(
Qt
::
ForeignWindow
))
{
if
(
pe
->
surfaceEventType
()
==
QPlatformSurfaceEvent
::
SurfaceCreated
)
{
auto
flags
=
w
->
flags
();
// A recent KWin change means it now follows WindowButtonHints on X11
// Some KDE applications use QDialogs for their main window,
// which means the KWin now surfaces those windows having the wrong hints.
// To avoid clients changing, we adjust flags here.
// This is documented as being only available on some platforms,
// so altering is relatively safe.
if
(
flags
.
testFlag
(
Qt
::
Dialog
))
{
if
(
!
w
->
transientParent
())
{
flags
.
setFlag
(
Qt
::
WindowMinimizeButtonHint
,
true
);
}
// QWINDOWSIZE_MAX from qwindow_p.h
const
auto
maxWindowSize
=
((
1
<<
24
)
-
1
);
if
(
w
->
maximumSize
()
==
QSize
(
maxWindowSize
,
maxWindowSize
))
{
flags
.
setFlag
(
Qt
::
WindowMaximizeButtonHint
,
true
);
}
w
->
setFlags
(
flags
);
}
if
(
qApp
->
property
(
s_schemePropertyName
).
isValid
())
{
installColorScheme
(
w
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment