genode/repos/libports/run/qt5_common.inc
Norman Feske d3d6b643f1 wm: shape report interception mechanism
This patch simplifies the propagation of pointer shapes from
window-manager clients to the pointer. The "shape" report is routed to
the wm server, which, in turn, reports it to the pointer. This way, the
pointer can easily correlate the label of the application's "shape"
report with the label of the application's Nitpicker session. The
formerly used manual rewriting of the "shape" label is not needed
anymore.

Since the wm server provides a "Report" service now, its <provides>
declaration must cover "Report" in addition to "Nitpicker" to avoid
runtime error messages. Vice versa, the wm is now expected to request
"shape" reports, which should be routed to the pointer (using the
'label_last' routing attribute).

Fixes #3165
2019-02-26 14:45:07 +01:00

227 lines
7.0 KiB
PHP

source ${genode_dir}/repos/libports/run/qt5_drivers.inc
set feature(Input) 1
set feature(Framebuffer) 1
set feature(Timer) 1
create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/src/expat \
[depot_user]/src/freetype \
[depot_user]/src/init \
[depot_user]/src/jpeg \
[depot_user]/src/libc \
[depot_user]/src/libpng \
[depot_user]/src/mesa \
[depot_user]/src/nitpicker \
[depot_user]/src/pcre16 \
[depot_user]/src/qt5_core \
[depot_user]/src/qt5_gui \
[depot_user]/src/qt5_qjpeg \
[depot_user]/src/qt5_qpa_nitpicker \
[depot_user]/src/report_rom \
[depot_user]/src/stdcxx \
[depot_user]/src/vfs \
[depot_user]/src/zlib \
[depot_user]/pkg/themed_wm \
[depot_user]/raw/qt5_dejavusans
#
# Build
#
proc qt5_build_components { feature_arg } {
upvar $feature_arg feature
set build_components { }
append build_components [drivers_build_components feature]
append build_components { }
return $build_components
}
#
# Configuration
#
proc qt5_layouter_config { } {
return {
<config rules="rom">
<report rules="yes"/>
<rules>
<screen name="screen"/>
<assign label_prefix="" target="screen" xpos="any" ypos="any"/>
</rules>
</config>}
}
proc qt5_decorator_binary { } { return "decorator" }
proc qt5_decorator_config { } {
return {
<config>
<!-- this is an example config for the themed decorator
<vfs>
<tar name="plain_decorator_theme.tar"/>
</vfs>
<libc/>
-->
<default-policy/>
</config>}
}
proc qt5_parent_provides { feature_arg } {
upvar $feature_arg feature
set parent_provides [drivers_parent_provides feature]
return $parent_provides
}
proc qt5_start_nodes { feature_arg } {
upvar $feature_arg feature
set start_nodes [drivers_start_nodes feature]
append start_nodes {
<start name="nitpicker" caps="200">
<resource name="RAM" quantum="2M"/>
<provides><service name="Nitpicker"/></provides>
<route> }
append_if [use_fb_sdl feature] start_nodes {
<service name="Framebuffer"> <child name="fb_sdl" /> </service>
}
append_if [use_fb_drv feature] start_nodes {
<service name="Framebuffer"> <child name="fb_drv" /> </service>
}
append start_nodes {
<service name="Input"> <child name="input_filter"/> </service>
<service name="Report"> <child name="wm_report_rom"/> </service>
<any-service> <parent /> <any-child /> </any-service>
</route>
<config>
<report focus="yes" hover="yes" xray="yes"/>
<domain name="pointer" layer="1" label="no" content="client" origin="pointer" />
<domain name="default" layer="2" label="no" content="client" focus="click" hover="always" />
<policy label_prefix="pointer" domain="pointer"/>
<default-policy domain="default"/>
</config>
</start>
<start name="pointer">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Report"/> </provides>
<config shapes="yes"/>
<route>
<service name="Nitpicker"> <child name="nitpicker"/> </service>
<service name="ROM" label="hover"> <child name="wm_report_rom"/> </service>
<service name="ROM" label="xray"> <child name="wm_report_rom"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="wm_report_rom">
<binary name="report_rom"/>
<resource name="RAM" quantum="4M"/>
<provides>
<service name="Report"/>
<service name="ROM"/>
</provides>
<config verbose="no">
<policy label="layouter -> focus_request" report="wm -> focus_request"/>
<policy label="decorator -> pointer" report="wm -> pointer"/>
<policy label="layouter -> window_list" report="wm -> window_list"/>
<policy label="wm -> focus" report="layouter -> focus"/>
<policy label="wm -> resize_request" report="layouter -> resize_request"/>
<policy label="decorator -> window_layout" report="layouter -> window_layout"/>
<policy label="layouter -> rules" report="layout_rules"/>
<policy label="layouter -> decorator_margins" report="decorator -> decorator_margins"/>
<policy label="layouter -> hover" report="decorator -> hover"/>
<policy label="clipboard -> focus" report="nitpicker -> focus"/>
<policy label="pointer -> hover" report="nitpicker -> hover"/>
<policy label="pointer -> xray" report="nitpicker -> xray"/>
</config>
</start>
<start name="wm" caps="250">
<resource name="RAM" quantum="8M"/>
<provides>
<service name="Nitpicker"/> <service name="Report"/>
</provides>
<config>
<policy label_prefix="decorator" role="decorator"/>
<policy label_prefix="layouter" role="layouter"/>
<default-policy/>
</config>
<route>
<service name="ROM" label="focus"> <child name="wm_report_rom"/> </service>
<service name="ROM" label="resize_request"> <child name="wm_report_rom"/> </service>
<service name="Report" label_last="shape"> <child name="pointer"/> </service>
<service name="Report"> <child name="wm_report_rom"/> </service>
<any-service>
<child name="nitpicker"/> <parent/> <any-child/>
</any-service>
</route>
</start>
<start name="layouter">
<binary name="window_layouter"/>
<resource name="RAM" quantum="4M"/>} [qt5_layouter_config] {
<route>
<service name="ROM" label="window_list"> <child name="wm_report_rom"/> </service>
<service name="ROM" label="focus_request"> <child name="wm_report_rom"/> </service>
<service name="ROM" label="hover"> <child name="wm_report_rom"/> </service>
<service name="ROM" label="decorator_margins"> <child name="wm_report_rom"/> </service>
<service name="ROM" label="rules"> <child name="wm_report_rom"/> </service>
<service name="Report" label="rules"> <child name="wm_report_rom" label="layout_rules"/> </service>
<service name="Report"> <child name="wm_report_rom"/> </service>
<any-service>
<child name="wm"/> <parent/> <any-child/>
</any-service>
</route>
</start>
<start name="decorator" caps="300">
<binary name="} [qt5_decorator_binary] {"/>
<resource name="RAM" quantum="16M"/>} [qt5_decorator_config] {
<route>
<service name="ROM" label="window_layout"> <child name="wm_report_rom"/> </service>
<service name="ROM" label="pointer"> <child name="wm_report_rom"/> </service>
<service name="Report"> <child name="wm_report_rom"/> </service>
<any-service>
<child name="wm"/> <parent/> <any-child/>
</any-service>
</route>
</start>
}
return $start_nodes
}
#
# Boot modules
#
proc qt5_boot_modules { feature_arg } {
upvar $feature_arg feature
set boot_modules { }
append boot_modules [drivers_boot_modules feature]
append boot_modules { }
return $boot_modules
}