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
KWin
Commits
2567d0c9
Commit
2567d0c9
authored
Dec 20, 2020
by
Vlad Zahorodnii
Browse files
platforms/x11: Init outputs during platform initialization
parent
8a606e47
Changes
2
Hide whitespace changes
Inline
Side-by-side
plugins/platforms/x11/standalone/screens_xrandr.cpp
View file @
2567d0c9
...
...
@@ -32,10 +32,6 @@ XRandRScreens::~XRandRScreens() = default;
void
XRandRScreens
::
init
()
{
KWin
::
Screens
::
init
();
// we need to call ScreenResources at least once to be able to use current
m_backend
->
initOutputs
();
setCount
(
m_backend
->
outputs
().
count
());
emit
changed
();
#ifndef KWIN_UNIT_TEST
connect
(
this
,
&
XRandRScreens
::
changed
,
this
,
[]
{
...
...
plugins/platforms/x11/standalone/x11_platform.cpp
View file @
2567d0c9
...
...
@@ -94,7 +94,7 @@ void X11StandalonePlatform::init()
}
XRenderUtils
::
init
(
kwinApp
()
->
x11Connection
(),
kwinApp
()
->
x11RootWindow
());
setReady
(
true
);
emit
screensQueried
();
initOutputs
();
}
Screens
*
X11StandalonePlatform
::
createScreens
(
QObject
*
parent
)
...
...
@@ -455,11 +455,13 @@ void X11StandalonePlatform::doUpdateOutputs()
if
(
!
Xcb
::
Extensions
::
self
()
->
isRandrAvailable
())
{
fallback
();
emit
screensQueried
();
return
;
}
T
resources
(
rootWindow
());
if
(
resources
.
isNull
())
{
fallback
();
emit
screensQueried
();
return
;
}
xcb_randr_crtc_t
*
crtcs
=
resources
.
crtcs
();
...
...
@@ -545,6 +547,8 @@ void X11StandalonePlatform::doUpdateOutputs()
if
(
m_outputs
.
isEmpty
())
{
fallback
();
}
emit
screensQueried
();
}
Outputs
X11StandalonePlatform
::
outputs
()
const
...
...
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