Since all Wayland session backends now use the same structure of
AbstractWaylandOutput we can create output devices like in the DRM backend.
First let us do this for Wayland nested sessions.
KWin |
Since all Wayland session backends now use the same structure of
AbstractWaylandOutput we can create output devices like in the DRM backend.
First let us do this for Wayland nested sessions.
Manually with output-count 1 and 2. Outputs are correctly shown in KScreen.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
plugins/platforms/wayland/wayland_output.cpp | ||
---|---|---|
63 | There are couple places in KWin core with just // TODO. I still wonder what those comments mean. Please add some meaningful text to the todo comment. | |
64 | Do you want to change these strings in the future? | |
plugins/platforms/wayland/wayland_output.h | ||
53 | Remove explicit. | |
56 | Make init a private method and WaylandBackend a friend class. |
plugins/platforms/wayland/wayland_output.cpp | ||
---|---|---|
64 | Sure. We could go with something like org.kde.kwin as manufacturer and wayland-nested# where # is the output number. | |
plugins/platforms/wayland/wayland_output.h | ||
56 | Why do you prefer this? I try to omit friend classes in general since it dilutes the concept of access restrictions. |
plugins/platforms/wayland/wayland_output.cpp | ||
---|---|---|
64 | I meant wayland-nested# for model. Don't know of any pointers for the uuid. |
plugins/platforms/wayland/wayland_output.h | ||
---|---|---|
56 | The main reason is to avoid littering of public interface with implementation details of the class. Also, if init() is public, it means that anybody can call it.
Yeah, it's actually a good idea to use friend as less as possible, but sometimes we have to use it otherwise code may become ridiculous. |
plugins/platforms/wayland/wayland_output.cpp | ||
---|---|---|
64 | Yeah, sounds good.
Derive it from manufacturer / model? |
plugins/platforms/wayland/wayland_output.cpp | ||
---|---|---|
64 | I found there is an ISO for uuids. We should somewhat adhere to that when we add it: https://en.wikipedia.org/wiki/Universally_unique_identifier |