Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
6f754187
Commit
6f754187
authored
Apr 27, 2021
by
Vlad Zahorodnii
Browse files
Port various components from WId-based KWindowEffects API
The WId-based KWindowEffects API is deprecated.
parent
0c57ec70
Changes
4
Hide whitespace changes
Inline
Side-by-side
applets/kicker/plugin/dashboardwindow.cpp
View file @
6f754187
...
...
@@ -217,7 +217,7 @@ void DashboardWindow::keyPressEvent(QKeyEvent *e)
void
DashboardWindow
::
updateTheme
()
{
KWindowEffects
::
enableBlurBehind
(
winId
()
,
true
);
KWindowEffects
::
enableBlurBehind
(
this
,
true
);
}
void
DashboardWindow
::
visualParentWindowChanged
(
QQuickWindow
*
window
)
...
...
logout-greeter/shutdowndlg.cpp
View file @
6f754187
...
...
@@ -200,7 +200,7 @@ void KSMShutdownDlg::init()
// set backgroundcontrast here, because in QEvent::PlatformSurface
// is too early and we don't have the root object yet
const
QColor
backgroundColor
=
rootObject
()
?
rootObject
()
->
property
(
"backgroundColor"
).
value
<
QColor
>
()
:
QColor
();
KWindowEffects
::
enableBackgroundContrast
(
winId
()
,
true
,
0.4
,
(
backgroundColor
.
value
()
>
128
?
1.6
:
0.3
),
1.7
);
KWindowEffects
::
enableBackgroundContrast
(
this
,
true
,
0.4
,
(
backgroundColor
.
value
()
>
128
?
1.6
:
0.3
),
1.7
);
KQuickAddons
::
QuickViewSharedEngine
::
showFullScreen
();
setFlag
(
Qt
::
FramelessWindowHint
);
requestActivate
();
...
...
@@ -208,7 +208,7 @@ void KSMShutdownDlg::init()
KWindowSystem
::
setState
(
winId
(),
NET
::
SkipTaskbar
|
NET
::
SkipPager
);
setKeyboardGrabEnabled
(
true
);
KWindowEffects
::
enableBlurBehind
(
winId
()
,
true
);
KWindowEffects
::
enableBlurBehind
(
this
,
true
);
if
(
auto
w
=
LayerShellQt
::
Window
::
get
(
this
))
{
w
->
setKeyboardInteractivity
(
LayerShellQt
::
Window
::
KeyboardInteractivityExclusive
);
w
->
setExclusiveZone
(
-
1
);
...
...
shell/panelconfigview.cpp
View file @
6f754187
...
...
@@ -87,8 +87,8 @@ void PanelConfigView::init()
void
PanelConfigView
::
updateBlurBehindAndContrast
()
{
KWindowEffects
::
enableBlurBehind
(
winId
()
,
m_theme
.
blurBehindEnabled
());
KWindowEffects
::
enableBackgroundContrast
(
winId
()
,
KWindowEffects
::
enableBlurBehind
(
this
,
m_theme
.
blurBehindEnabled
());
KWindowEffects
::
enableBackgroundContrast
(
this
,
m_theme
.
backgroundContrastEnabled
(),
m_theme
.
backgroundContrast
(),
m_theme
.
backgroundIntensity
(),
...
...
@@ -183,7 +183,7 @@ void PanelConfigView::syncLocation()
break
;
}
KWindowEffects
::
slideWindow
(
winId
()
,
slideLocation
,
-
1
);
KWindowEffects
::
slideWindow
(
this
,
slideLocation
,
-
1
);
if
(
m_enabledBorders
!=
enabledBorders
)
{
m_enabledBorders
=
enabledBorders
;
...
...
shell/panelview.cpp
View file @
6f754187
...
...
@@ -480,7 +480,7 @@ void PanelView::positionPanel()
m_shellSurface
->
setPosition
(
pos
);
}
KWindowEffects
::
slideWindow
(
winId
()
,
slideLocation
,
-
1
);
KWindowEffects
::
slideWindow
(
this
,
slideLocation
,
-
1
);
}
QRect
PanelView
::
geometryByDistance
(
int
distance
)
const
...
...
@@ -772,7 +772,7 @@ void PanelView::setAutoHideEnabled(bool enabled)
value
|=
hideType
<<
8
;
xcb_change_property
(
c
,
XCB_PROP_MODE_REPLACE
,
winId
(),
atom
->
atom
,
XCB_ATOM_CARDINAL
,
32
,
1
,
&
value
);
KWindowEffects
::
slideWindow
(
winId
()
,
slideLocation
,
-
1
);
KWindowEffects
::
slideWindow
(
this
,
slideLocation
,
-
1
);
}
#endif
if
(
m_shellSurface
&&
(
m_visibilityMode
==
PanelView
::
AutoHide
||
m_visibilityMode
==
PanelView
::
LetWindowsCover
))
{
...
...
@@ -1067,8 +1067,8 @@ QPointF PanelView::positionAdjustedForContainment(const QPointF &point) const
void
PanelView
::
updateMask
()
{
if
(
m_backgroundHints
==
Plasma
::
Types
::
NoBackground
)
{
KWindowEffects
::
enableBlurBehind
(
winId
()
,
false
);
KWindowEffects
::
enableBackgroundContrast
(
winId
()
,
false
);
KWindowEffects
::
enableBlurBehind
(
this
,
false
);
KWindowEffects
::
enableBackgroundContrast
(
this
,
false
);
setMask
(
QRegion
());
}
else
{
QRegion
mask
;
...
...
@@ -1081,8 +1081,8 @@ void PanelView::updateMask()
}
}
KWindowEffects
::
enableBlurBehind
(
winId
()
,
m_theme
.
blurBehindEnabled
(),
mask
);
KWindowEffects
::
enableBackgroundContrast
(
winId
()
,
KWindowEffects
::
enableBlurBehind
(
this
,
m_theme
.
blurBehindEnabled
(),
mask
);
KWindowEffects
::
enableBackgroundContrast
(
this
,
m_theme
.
backgroundContrastEnabled
(),
m_theme
.
backgroundContrast
(),
m_theme
.
backgroundIntensity
(),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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