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
01f7ef35
Commit
01f7ef35
authored
Apr 12, 2021
by
Aleix Pol Gonzalez
🐧
Committed by
Aleix Pol Gonzalez
Apr 15, 2021
Browse files
drm: Make sure we read all pending udev events
parent
d216e74c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/platforms/drm/drm_backend.cpp
View file @
01f7ef35
...
...
@@ -249,24 +249,22 @@ bool DrmBackend::initialize()
QSocketNotifier
*
notifier
=
new
QSocketNotifier
(
fd
,
QSocketNotifier
::
Read
,
this
);
connect
(
notifier
,
&
QSocketNotifier
::
activated
,
this
,
[
this
]
{
auto
device
=
m_udevMonitor
->
getDevice
();
if
(
!
device
)
{
return
;
}
bool
drm
=
false
;
for
(
auto
gpu
:
m_gpus
)
{
if
(
gpu
->
drmId
()
==
device
->
sysNum
())
{
drm
=
true
;
break
;
while
(
auto
device
=
m_udevMonitor
->
getDevice
())
{
bool
drm
=
false
;
for
(
auto
gpu
:
m_gpus
)
{
if
(
gpu
->
drmId
()
==
device
->
sysNum
())
{
drm
=
true
;
break
;
}
}
if
(
!
drm
)
{
return
;
}
if
(
device
->
hasProperty
(
"HOTPLUG"
,
"1"
))
{
qCDebug
(
KWIN_DRM
)
<<
"Received hot plug event for monitored drm device"
;
updateOutputs
();
updateCursor
();
}
}
if
(
!
drm
)
{
return
;
}
if
(
device
->
hasProperty
(
"HOTPLUG"
,
"1"
))
{
qCDebug
(
KWIN_DRM
)
<<
"Received hot plug event for monitored drm device"
;
updateOutputs
();
updateCursor
();
}
}
);
...
...
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