winft / disman

Qt/C++ display management library
GNU Lesser General Public License v2.1
2 stars 1 forks source link

Remodel auxiliary properties data flow #6

Closed romangg closed 7 months ago

romangg commented 4 years ago

Problem statement

Certain properties we have and need to evaluate in the backend are not meant to be passed on through the windowing system. At the moment these are:

In practice the values of such properties are currently instead saved and loaded by KDisplay directly to so-called control files. But in any case the API of Disman becomes less intuitive and functional because of that:

Solution ideas

Document API

Improve documentation of Disman API so it is clear some values must be side-loaded by the consumer in one direction.

Disman Control

Move auxiliary data storing from KDisplay to Disman and declare a new type Disman::Control that can be composed into a Disman::Config and side-loads the relevant additional values through one or two backends (for example via file reads/writes directly or a central control manager process via D-Bus if D-Bus is available).

Overview

redesign-hubs

romangg commented 4 years ago

Following concept:

romangg commented 4 years ago

Current progress is at:

The overall concept was applied but the "hubs" have been less drastic of a change as they look in the diagram above. Basically the prior backends have become the Window System hub and a new class Filer_controller has been introduced that does the Control hub job.

Open tasks:

Postponed tasks (will go into follow-up issues):

romangg commented 4 years ago

The branches are now in a good state and I'll create merge requests for them later today.

I decided to ultimately give up on any file system watching in the beginning. I.e. Disman can only work with its full functionality when D-Bus is available (or as a single process without automatic changes).

The reason is that otherwise we would have a second update channel and must synchronize the file read on change with potential later windowing system notices for a change. This might be doable with a timer so it could be revisited later.

romangg commented 4 years ago

mentioned in commit d5ee6c7d47db94348bafc67053c7f37add2b702f