app_server: Implement screen changed hooks and notifications

Operating Systems / Haiku - Michael Lotz [mlotz.ch] - 21 November 2017 21:18 UTC

The ScreenOwner interface gets an additional ScreenChanged() hook. It is implemented in the Desktop class to automatically set the preferred screen mode on the changed screen.

The HWInterfaceListener, previously only used by the downstream DrawingEngine, gets an additional ScreenChanged() hook as well to inform an upstream client of a changed screen.

The ScreenManager ties these two mechanisms together.

f3e8ed4d48 app_server: Implement screen changed hooks and notifications.
src/servers/app/Desktop.cpp | 13 ++++++++
src/servers/app/Desktop.h | 1 +
src/servers/app/ScreenManager.cpp | 55 +++++++++++++++++++++++++++++++--
src/servers/app/ScreenManager.h | 10 ++++--
src/servers/app/drawing/HWInterface.cpp | 13 ++++++++
src/servers/app/drawing/HWInterface.h | 7 ++++-
6 files changed, 94 insertions(+), 5 deletions(-)

Upstream: cgit.haiku-os.org


  • Share