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
libkscreen
Commits
be83b5d8
Commit
be83b5d8
authored
Oct 22, 2020
by
Aleix Pol Gonzalez
🐧
Browse files
Initialise the WaylandOutput::size
parent
81b677ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
backends/kwayland/waylandoutput.cpp
View file @
be83b5d8
...
...
@@ -112,6 +112,7 @@ void WaylandOutput::updateKScreenOutput(OutputPtr &output)
m_modeIdMap
.
clear
();
QString
currentModeId
=
QStringLiteral
(
"-1"
);
QSize
currentSize
;
for
(
const
Wl
::
OutputDevice
::
Mode
&
wlMode
:
m_device
->
modes
())
{
ModePtr
mode
(
new
Mode
());
const
QString
name
=
modeName
(
wlMode
);
...
...
@@ -134,6 +135,7 @@ void WaylandOutput::updateKScreenOutput(OutputPtr &output)
mode
->
setName
(
name
);
if
(
wlMode
.
flags
.
testFlag
(
Wl
::
OutputDevice
::
Mode
::
Flag
::
Current
))
{
currentSize
=
wlMode
.
size
;
currentModeId
=
modeId
;
}
if
(
wlMode
.
flags
.
testFlag
(
Wl
::
OutputDevice
::
Mode
::
Flag
::
Preferred
))
{
...
...
@@ -150,6 +152,7 @@ void WaylandOutput::updateKScreenOutput(OutputPtr &output)
qCWarning
(
KSCREEN_WAYLAND
)
<<
"Could not find the current mode id"
<<
modeList
;
}
output
->
setSize
(
output
->
isHorizontal
()
?
currentSize
:
currentSize
.
transposed
());
output
->
setCurrentModeId
(
currentModeId
);
output
->
setPreferredModes
(
preferredModeIds
);
output
->
setModes
(
modeList
);
...
...
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