https://bugs.kde.org/show_bug.cgi?id=338796

Jakob Petsovits <jpe...@petsovits.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
                   |ma/libkscreen/-/commit/c374 |ma/libkscreen/-/commit/0660
                   |50e186a705e650f294ea7789f21 |b7d0f47a489ff20e7fcb7bb4474
                   |b4133acbb                   |6ad730fac

--- Comment #20 from Jakob Petsovits <jpe...@petsovits.com> ---
Git commit 0660b7d0f47a489ff20e7fcb7bb44746ad730fac by Jakob Petsovits.
Committed on 12/01/2024 at 18:27.
Pushed by jpetso into branch 'Plasma/6.0'.

libdpms: Delay supportedChanged signal until after the constructor

KScreen::Dpms was giving promises that it couldn't keep,
i.e. blocking in isSupported() until initialization is done.
Implementing this safely as specified would involve multithreading
or manual event loop processing, both of which seem overkill here.

Given the lack of blocking in isSupported(), an owner of the Dpms
object could only connect to supportedChanged(). However, this was
emitted during the constructor, which makes connections pointless
for someone who can only connect after creating the object.

To make any of this work, queue the majority of initialization work
until after the constructor is called, for both X11 and Wayland.


(cherry picked from commit c37450e186a705e650f294ea7789f21b4133acbb)

M  +2    -2    src/libdpms/dpms.h
M  +27   -22   src/libdpms/waylanddpmshelper.cpp
M  +8    -1    src/libdpms/xcbdpmshelper.cpp
M  +3    -0    src/libdpms/xcbdpmshelper_p.h

https://invent.kde.org/plasma/libkscreen/-/commit/0660b7d0f47a489ff20e7fcb7bb44746ad730fac

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to