Warning, /plasma/libkscreen/backends/kwayland/README.md is written in an unsupported language. File is not indexed.
0001 # Design of libkscreen's Wayland backend 0002 0003 This backend uses KWayland's OutputManagement protocol for listing and 0004 configuring devices. This is described here. 0005 0006 ## Listing outputs 0007 0008 KScreen's outputs are created from KWayland::Client::OutputDevice objects, 0009 they copy the data into kscreen's Outputs, and update these objects. A list 0010 of outputs is requested from the client Registry object. 0011 0012 ## Configuring outputs 0013 0014 The backend asks the global OutputManagement interface for an OutputConfiguration 0015 object, then sets the changes per outputdevice on this object, and asks the 0016 compositor to apply() this configuration. 0017 0018 For this to work, the compositor should support the Wayland org_kde_kwin_outputdevice 0019 and org_kde_kwin_outputmanagement protocols, for example through 0020 KWayland::Server classes OutputDevice, OutputManagmenent and OuputConfiguration. 0021 0022 ## General working 0023 0024 WaylandBackend creates a global static internal config, available through 0025 WaylandBackend::internalConfig(). WaylandConfig binds to the wl_registry 0026 callbacks and catches org_kde_kwin_outputdevice creation and destruction. 0027 It passes org_kde_kwin_outputdevice creation and removal on to 0028 WB::internalConfig() to handle its internal data representation as WaylandOutput. 0029 WaylandOutput binds to org_kde_kwin_outputdevice's callback, and gets notified 0030 of geometry and modes, including changes. WaylandOutput administrates the 0031 internal representation of these objects, and invokes the global notifier, 0032 which then runs the pointers it holds through the updateK* methods in 0033 Wayland{Screen,Output,...}. 0034 0035 KScreen:{Screen,Output,Edid,Mode} objects are created from the internal 0036 representation as requested (usually triggered by the creation of a 0037 KScreen::Config object through KScreen::Config::current()). As with other 0038 backends, the objects which are handed out to the lib's user are expected 0039 to be deleted by the user, the backend only takes ownership of its internal 0040 data representation objects. 0041 0042 ## Note about scope of output ids 0043 0044 The ids of the outputdevices are internal to the wayland backend. The id is 0045 generated in the wayland backend, and does not match kwin's output ids. Do 0046 not try to read kwin's config from here. 0047 0048 <sebas@kde.org> 0049