Skip to content

scene: Introduce window items

Vlad Zahorodnii requested to merge work/scene-item into master

Currently, dealing with sub-surfaces is very difficult due to the scene design being heavily influenced by X11 requirements.

The goal of this change is to re-work scene abstractions to make improving the wayland support easier.

The Item class is based on the QQuickItem class. My hope is that one day we will be able to transition to QtQuick for painting scene, but in meanwhile it makes more sense to have a minimalistic internal item class.

The WindowItem class represents a window. The SurfaceItem class represents the contents of either an X11, or a Wayland, or an internal surface. The DecorationItem and the ShadowItem class represent the server-side deco and drop-shadow, respectively.

At the moment, the SurfaceItem is bound to the scene window, but the long term plan is to break that connection so we could re-use the SurfaceItem for things such as software cursors and drag-and-drop additional icons.

One of the responsibilities of the Item is to schedule repaints as needed. Ideally, there shouldn't be any addRepaint() calls in the core code. The Item class schedules repaints on geometry updates. In the future, it also has to request an update if its opacity or visibility changes.

Depends on

cc #30

Edited by Vlad Zahorodnii

Merge request reports

Loading