From debb4fabd0b6f3084c95cefab6263c33ef5325f9 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Wed, 17 Apr 2019 01:08:13 +0200 Subject: [PATCH] Window mess --- runtimes/ui/motif_decorator/README | 3 + runtimes/ui/motif_decorator/Tupfile | 6 ++ runtimes/ui/motif_decorator/runtime | 19 +++++ runtimes/ui/window_layouter/README | 3 + runtimes/ui/window_layouter/Tupfile | 7 ++ runtimes/ui/window_layouter/archives | 6 ++ runtimes/ui/window_layouter/runtime | 39 ++++++++++ runtimes/ui/wm/README | 19 +++++ runtimes/ui/wm/Tupfile | 9 +++ runtimes/ui/wm/runtime | 110 +++++++++++++++++++++++++++ 10 files changed, 221 insertions(+) create mode 100644 runtimes/ui/motif_decorator/README create mode 100644 runtimes/ui/motif_decorator/Tupfile create mode 100644 runtimes/ui/motif_decorator/runtime create mode 100644 runtimes/ui/window_layouter/README create mode 100644 runtimes/ui/window_layouter/Tupfile create mode 100644 runtimes/ui/window_layouter/archives create mode 100644 runtimes/ui/window_layouter/runtime create mode 100644 runtimes/ui/wm/README create mode 100644 runtimes/ui/wm/Tupfile create mode 100644 runtimes/ui/wm/runtime diff --git a/runtimes/ui/motif_decorator/README b/runtimes/ui/motif_decorator/README new file mode 100644 index 000000000..3e14d80de --- /dev/null +++ b/runtimes/ui/motif_decorator/README @@ -0,0 +1,3 @@ + + Motif-inspired window decorator + diff --git a/runtimes/ui/motif_decorator/Tupfile b/runtimes/ui/motif_decorator/Tupfile new file mode 100644 index 000000000..f5c124671 --- /dev/null +++ b/runtimes/ui/motif_decorator/Tupfile @@ -0,0 +1,6 @@ +TARGET_NAME = motif_decorator +include_rules + +PKG_DEPENDS += @(PUBLIC_SRC_MOTIF_DECORATOR) + +: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/ui/motif_decorator/runtime b/runtimes/ui/motif_decorator/runtime new file mode 100644 index 000000000..539f80831 --- /dev/null +++ b/runtimes/ui/motif_decorator/runtime @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + <closer/> </controls> + <default-policy/> + </config> + +</runtime> diff --git a/runtimes/ui/window_layouter/README b/runtimes/ui/window_layouter/README new file mode 100644 index 000000000..9aacf5e87 --- /dev/null +++ b/runtimes/ui/window_layouter/README @@ -0,0 +1,3 @@ + + Default window layouter + diff --git a/runtimes/ui/window_layouter/Tupfile b/runtimes/ui/window_layouter/Tupfile new file mode 100644 index 000000000..eabc25b86 --- /dev/null +++ b/runtimes/ui/window_layouter/Tupfile @@ -0,0 +1,7 @@ +TARGET_NAME = window_layouter +include_rules + +PKG_DEPENDS += \ + @(PUBLIC_SRC_WINDOW_LAYOUTER) \ + +: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/ui/window_layouter/archives b/runtimes/ui/window_layouter/archives new file mode 100644 index 000000000..9cd19eac9 --- /dev/null +++ b/runtimes/ui/window_layouter/archives @@ -0,0 +1,6 @@ +_/raw/window_layouter +_/src/window_layouter +_/src/init +_/src/fs_report +_/src/fs_rom +_/src/vfs diff --git a/runtimes/ui/window_layouter/runtime b/runtimes/ui/window_layouter/runtime new file mode 100644 index 000000000..b1d47a874 --- /dev/null +++ b/runtimes/ui/window_layouter/runtime @@ -0,0 +1,39 @@ +<runtime ram="7M" caps="400" binary="window_layouter"> + + <requires> + <nitpicker/> + <rom label="window_list"/> + <rom label="focus_request"/> + <rom label="hover"/> + <rom label="decorator_margins"/> + <report/> + </requires> + + <content> + <rom label="window_layouter"/> + </content> + + <config> + <rules> + <screen name="screen"/> + <assign label_prefix="" target="screen" xpos="any" ypos="any"/> + </rules> + <press key="KEY_SCREEN"> + <press key="KEY_TAB" action="next_window"> + <release key="KEY_TAB"> + <release key="KEY_SCREEN" action="raise_window"/> + </release> + <release key="KEY_SCREEN" action="raise_window"/> + </press> + <press key="KEY_LEFTSHIFT"> + <press key="KEY_TAB" action="prev_window"> + <release key="KEY_TAB"> + <release key="KEY_SCREEN" action="raise_window"/> + </release> + </press> + </press> + <press key="KEY_ENTER" action="toggle_fullscreen"/> + </press> + </config> + +</runtime> diff --git a/runtimes/ui/wm/README b/runtimes/ui/wm/README new file mode 100644 index 000000000..3477acf5f --- /dev/null +++ b/runtimes/ui/wm/README @@ -0,0 +1,19 @@ + + Window manager + +This package provides the central part of Genode's componentized GUI stack +via a custom implementation of the nitpicker session interface. +It must be complemented by a window layouter and a window decorator, each of +which is a separate client component. Whereas the window decorator defines how +windows look, the window layouter defines how they behave. + +The window manager, decorator, and layouter propagate their respective state +(like the window layout or the decoration margins) via reports and ROMs. The +window-manager package manages the flow of information between those parties +by providing a report and ROM service to the external layouter and decorator. + +The special roles of the layouter and decorator among the window-manager +clients are identified according to their names (labels), which are suffixed +with "layouter" and "decorator" respectively. All other clients are expected +to be regular windowed applications. + diff --git a/runtimes/ui/wm/Tupfile b/runtimes/ui/wm/Tupfile new file mode 100644 index 000000000..5c55bacd4 --- /dev/null +++ b/runtimes/ui/wm/Tupfile @@ -0,0 +1,9 @@ +TARGET_NAME = wm +include_rules + +PKG_DEPENDS += \ + @(PUBLIC_SRC_WM) \ + @(PUBLIC_SRC_INIT) \ + @(PUBLIC_SRC_REPORT_ROM) \ + +: runtime |> !collect_pkg_runtime |> diff --git a/runtimes/ui/wm/runtime b/runtimes/ui/wm/runtime new file mode 100644 index 000000000..6a316a7c9 --- /dev/null +++ b/runtimes/ui/wm/runtime @@ -0,0 +1,110 @@ +<runtime ram="16M" caps="512" binary="init"> + + <requires> + <nitpicker/> + <report/> + </requires> + + <provides> <nitpicker/> <rom/> <report/> </provides> + + <content> + <rom label="init"/> + <rom label="report_rom"/> + <rom label="wm"/> + </content> + + <config> + <parent-provides> + <service name="ROM"/> + <service name="PD"/> + <service name="CPU"/> + <service name="LOG"/> + <service name="Nitpicker"/> + <service name="Timer"/> + <service name="Report"/> + </parent-provides> + + <default-route> + <any-service> <parent/> <any-child/> </any-service> + </default-route> + + <default caps="100"/> + + <service name="Nitpicker"> + <default-policy> <child name="wm"/> </default-policy> + </service> + + <service name="ROM"> + <policy label_suffix="layouter -> window_list"> + <child name="report_rom" label="layouter -> window_list"/> </policy> + <policy label_suffix="layouter -> focus_request"> + <child name="report_rom" label="layouter -> focus_request"/> </policy> + <policy label_suffix="layouter -> hover"> + <child name="report_rom" label="layouter -> hover"/> </policy> + <policy label_suffix="layouter -> decorator_margins"> + <child name="report_rom" label="layouter -> decorator_margins"/> </policy> + <policy label_suffix="layouter -> rules"> + <child name="report_rom" label="layouter -> rules"/> </policy> + <policy label_suffix="decorator -> window_layout"> + <child name="report_rom" label="decorator -> window_layout"/> </policy> + <policy label_suffix="decorator -> pointer"> + <child name="report_rom" label="decorator -> pointer"/> </policy> + </service> + + <service name="Report"> + <policy label_suffix="layouter -> window_layout"> + <child name="report_rom" label="layouter -> window_layout"/> </policy> + <policy label_suffix="layouter -> resize_request"> + <child name="report_rom" label="layouter -> resize_request"/> </policy> + <policy label_suffix="layouter -> focus"> + <child name="report_rom" label="layouter -> focus"/> </policy> + <policy label_suffix="layouter -> rules"> + <child name="report_rom" label="layouter -> rules"/> </policy> + <policy label_suffix="decorator -> hover"> + <child name="report_rom" label="decorator -> hover"/> </policy> + <policy label_suffix="decorator -> decorator_margins"> + <child name="report_rom" label="decorator -> decorator_margins"/> </policy> + <policy label_suffix="-> shape"> <child name="wm"/> </policy> + </service> + + <start name="report_rom"> + <resource name="RAM" quantum="4M"/> + <provides> + <service name="Report"/> + <service name="ROM"/> + </provides> + <config> + <policy label="layouter -> window_list" report="wm -> window_list"/> + <policy label="layouter -> focus_request" report="wm -> focus_request"/> + <policy label="layouter -> hover" report="decorator -> hover"/> + <policy label="layouter -> decorator_margins" report="decorator -> decorator_margins"/> + <policy label="layouter -> rules" report="layouter -> rules"/> + <policy label="decorator -> window_layout" report="layouter -> window_layout"/> + <policy label="decorator -> pointer" report="wm -> pointer"/> + <policy label="wm -> resize_request" report="layouter -> resize_request"/> + <policy label="wm -> focus" report="layouter -> focus"/> + </config> + </start> + + <start name="wm" caps="250"> + <resource name="RAM" quantum="8M"/> + <provides> + <service name="Nitpicker"/> <service name="Report"/> + </provides> + <config> + <policy label_suffix="decorator -> " role="decorator"/> + <policy label_suffix="layouter -> " role="layouter"/> + <default-policy/> + </config> + <route> + <service name="ROM" label="resize_request"> <child name="report_rom"/> </service> + <service name="ROM" label="focus"> <child name="report_rom"/> </service> + <service name="Report" label_last="shape"> <parent/> </service> + <service name="Report"> <child name="report_rom"/> </service> + <service name="Nitpicker" label=""> <parent label="focus"/> </service> + <any-service> <parent/> </any-service> + </route> + </start> + </config> + +</runtime>