A patch for QScreen::sdrBrightnessLevel()
Dmitry Kazakov
dimula73 at gmail.com
Tue Jan 13 11:07:08 GMT 2026
Hi, all!
If someone might be interested in that, I did a bit of research on
implementing a way of fetching screen's SDR brightness level in Qt's
QScreen implementation on Windows. This value is configured by the user in
the display settings, so the application needs this value to be able to
blend the GUI elements on the HDR canvas.
Here is the draft patch:
https://invent.kde.org/dkazakov/qtbase/-/commit/b401b32e3eb2616087ca9614df18959673c05e5a
Current limitations:
1) The feature is implemented on Windows only. It is technically possible
to implement that on Wayland, but this draft doesn't address that.
2) QScreen::sdrBrightnessLevelChanged() signal is **NOT** delivered when
the user actually changes the SDR brightness preference. There seems to be
no WinAPI message delivered when this setting is changed. At least
nothing I could see in the docs or event stream dumps. Id you know some
details about that, please yell! :)
Though the signal is delivered when the user toggles SDR and HDR modes of
the screen. It makes Windows to deliver WM_DISPLAYCHANGE, which is handled
by QWindowsScreenManager properly.
--
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20260113/9053fc2a/attachment.htm>
More information about the kimageshop
mailing list