<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 13/01/2026 19:07, Dmitry Kazakov
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAEkBSfX4hAYsEcHEnAQV3j1raxgzzfDGEADgqyM1osFfiL7fSQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hi, all!</div>
        <div><br>
        </div>
        <div>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.</div>
        <div><br>
        </div>
        <div>Here is the draft patch:</div>
        <div><a
href="https://invent.kde.org/dkazakov/qtbase/-/commit/b401b32e3eb2616087ca9614df18959673c05e5a"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://invent.kde.org/dkazakov/qtbase/-/commit/b401b32e3eb2616087ca9614df18959673c05e5a</a></div>
        <div><br>
        </div>
        <div>Current limitations:</div>
        <div><br>
        </div>
        <div>1) The feature is implemented on Windows only. It is
          technically possible to implement that on Wayland, but this
          draft doesn't address that.<br>
          <br>
          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! :)<br>
        </div>
      </div>
    </blockquote>
    <p>I checked what Chrome/Chromium does (both the code and the actual
      behaviour), and it seems to only refresh the SDR brightness value
      on receiving `WM_ACTIVATEAPP`, so it seems even Chromium devs
      haven't found a way to get notified of the SDR brightness
      changing, or perhaps they just consider this good enough.</p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAEkBSfX4hAYsEcHEnAQV3j1raxgzzfDGEADgqyM1osFfiL7fSQ@mail.gmail.com">
      <div dir="ltr">
        <div><br>
          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.</div>
        <div><br>
        </div>
        <div>--</div>
        <div dir="ltr" class="gmail_signature"
          data-smartmail="gmail_signature">Dmitry Kazakov</div>
      </div>
    </blockquote>
    Alvin Wong
  </body>
</html>