diff --git a/repos/dde_linux/recipes/pkg/drivers_interactive-imx8q_evk/archives b/repos/dde_linux/recipes/pkg/drivers_interactive-imx8q_evk/archives
index 1f79737b50..0a883e4379 100644
--- a/repos/dde_linux/recipes/pkg/drivers_interactive-imx8q_evk/archives
+++ b/repos/dde_linux/recipes/pkg/drivers_interactive-imx8q_evk/archives
@@ -1,4 +1,5 @@
_/src/imx8_fb_drv
_/src/usb_host_drv
_/src/usb_hid_drv
+_/src/input_event_client
_/raw/drivers_interactive-imx8q_evk
diff --git a/repos/dde_linux/recipes/pkg/drivers_interactive-rpi/archives b/repos/dde_linux/recipes/pkg/drivers_interactive-rpi/archives
index 9416721fac..80e7db6c73 100644
--- a/repos/dde_linux/recipes/pkg/drivers_interactive-rpi/archives
+++ b/repos/dde_linux/recipes/pkg/drivers_interactive-rpi/archives
@@ -1,4 +1,5 @@
_/src/platform_drv
_/src/usb_drv
_/src/rpi_fb_drv
+_/src/input_event_client
_/raw/drivers_interactive-rpi
diff --git a/repos/dde_linux/recipes/raw/drivers_interactive-imx8q_evk/drivers.config b/repos/dde_linux/recipes/raw/drivers_interactive-imx8q_evk/drivers.config
index 91f5a12e41..5ec272bb69 100644
--- a/repos/dde_linux/recipes/raw/drivers_interactive-imx8q_evk/drivers.config
+++ b/repos/dde_linux/recipes/raw/drivers_interactive-imx8q_evk/drivers.config
@@ -10,13 +10,11 @@
+
-
-
-
@@ -68,4 +66,14 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/repos/dde_linux/recipes/raw/drivers_interactive-rpi/drivers.config b/repos/dde_linux/recipes/raw/drivers_interactive-rpi/drivers.config
index 3496801946..9ca74a2dbe 100644
--- a/repos/dde_linux/recipes/raw/drivers_interactive-rpi/drivers.config
+++ b/repos/dde_linux/recipes/raw/drivers_interactive-rpi/drivers.config
@@ -10,13 +10,11 @@
+
-
-
-
@@ -67,4 +65,14 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/repos/gems/recipes/pkg/drivers_managed-pc/archives b/repos/gems/recipes/pkg/drivers_managed-pc/archives
index 1fcae1974c..75016727d9 100644
--- a/repos/gems/recipes/pkg/drivers_managed-pc/archives
+++ b/repos/gems/recipes/pkg/drivers_managed-pc/archives
@@ -8,9 +8,10 @@ _/src/intel_fb_drv
_/src/boot_fb_drv
_/src/ahci_drv
_/src/report_rom
-_/src/input_filter
+_/src/event_filter
_/src/init
_/src/driver_manager
_/src/rom_filter
_/src/rom_reporter
+_/src/input_event_client
_/raw/drivers_managed-pc
diff --git a/repos/gems/recipes/raw/drivers_managed-pc/content.mk b/repos/gems/recipes/raw/drivers_managed-pc/content.mk
index 5ffca7ced4..e570c1cae7 100644
--- a/repos/gems/recipes/raw/drivers_managed-pc/content.mk
+++ b/repos/gems/recipes/raw/drivers_managed-pc/content.mk
@@ -1,11 +1,11 @@
-content: drivers.config fb_drv.config input_filter.config en_us.chargen \
+content: drivers.config fb_drv.config event_filter.config en_us.chargen \
special.chargen numlock_remap.config
drivers.config numlock_remap.config:
cp $(REP_DIR)/recipes/raw/drivers_managed-pc/$@ $@
-fb_drv.config input_filter.config:
+fb_drv.config event_filter.config:
cp $(GENODE_DIR)/repos/os/recipes/raw/drivers_interactive-pc/$@ $@
en_us.chargen special.chargen:
- cp $(GENODE_DIR)/repos/os/src/server/input_filter/$@ $@
+ cp $(GENODE_DIR)/repos/os/src/server/event_filter/$@ $@
diff --git a/repos/gems/recipes/raw/drivers_managed-pc/drivers.config b/repos/gems/recipes/raw/drivers_managed-pc/drivers.config
index b1583d20f0..938af629ed 100644
--- a/repos/gems/recipes/raw/drivers_managed-pc/drivers.config
+++ b/repos/gems/recipes/raw/drivers_managed-pc/drivers.config
@@ -12,6 +12,7 @@
+
@@ -29,9 +30,6 @@
-
-
-
@@ -170,20 +168,41 @@
-
+
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/repos/gems/recipes/raw/drivers_managed-pc/input_filter.config b/repos/gems/recipes/raw/drivers_managed-pc/event_filter.config
similarity index 93%
rename from repos/gems/recipes/raw/drivers_managed-pc/input_filter.config
rename to repos/gems/recipes/raw/drivers_managed-pc/event_filter.config
index 0ebf6b5fea..c18bae22a8 100644
--- a/repos/gems/recipes/raw/drivers_managed-pc/input_filter.config
+++ b/repos/gems/recipes/raw/drivers_managed-pc/event_filter.config
@@ -1,6 +1,4 @@
-
-
+
+
diff --git a/repos/gems/run/cpu_load_display.run b/repos/gems/run/cpu_load_display.run
index 08c9640abd..17362cd35e 100644
--- a/repos/gems/run/cpu_load_display.run
+++ b/repos/gems/run/cpu_load_display.run
@@ -39,16 +39,18 @@ install_config {
+
-
-
-
-
+
+
+
+
+
diff --git a/repos/gems/run/decorator.run b/repos/gems/run/decorator.run
index ac17cfcf08..4ab19c571f 100644
--- a/repos/gems/run/decorator.run
+++ b/repos/gems/run/decorator.run
@@ -41,9 +41,9 @@ install_config {
+
-
@@ -57,9 +57,11 @@ install_config {
-
-
-
+
+
+
+
+
diff --git a/repos/gems/run/decorator_stress.run b/repos/gems/run/decorator_stress.run
index b10ba7a333..5b9d0cb7f6 100644
--- a/repos/gems/run/decorator_stress.run
+++ b/repos/gems/run/decorator_stress.run
@@ -43,16 +43,18 @@ install_config {
+
-
-
-
-
+
+
+
+
+
diff --git a/repos/gems/run/depot_deploy.run b/repos/gems/run/depot_deploy.run
index d51a24b19f..ce80017048 100644
--- a/repos/gems/run/depot_deploy.run
+++ b/repos/gems/run/depot_deploy.run
@@ -52,16 +52,18 @@ install_config {
+
-
-
-
-
+
+
+
+
+
diff --git a/repos/gems/run/driver_manager.run b/repos/gems/run/driver_manager.run
index e50c5ac062..905a245340 100644
--- a/repos/gems/run/driver_manager.run
+++ b/repos/gems/run/driver_manager.run
@@ -50,8 +50,8 @@ install_config {
-
-
+
+
@@ -61,13 +61,11 @@ install_config {
+
-
-
-
-
+
@@ -99,9 +97,11 @@ install_config {
-
+
+
+
-
+
@@ -115,7 +115,6 @@ install_config {
-
diff --git a/repos/gems/run/gui_fader.run b/repos/gems/run/gui_fader.run
index 915e8bc2ad..aaa9576918 100644
--- a/repos/gems/run/gui_fader.run
+++ b/repos/gems/run/gui_fader.run
@@ -38,16 +38,18 @@ install_config {
+
-
-
-
-
+
+
+
+
+
diff --git a/repos/gems/run/leitzentrale.run b/repos/gems/run/leitzentrale.run
index bba1ae0360..0e42b02833 100644
--- a/repos/gems/run/leitzentrale.run
+++ b/repos/gems/run/leitzentrale.run
@@ -72,9 +72,9 @@ install_config {
+
-
@@ -92,9 +92,11 @@ install_config {
-
-
-
+
+
+
+
+
diff --git a/repos/gems/run/menu_view.run b/repos/gems/run/menu_view.run
index b8afc0cd3d..932ec843e0 100644
--- a/repos/gems/run/menu_view.run
+++ b/repos/gems/run/menu_view.run
@@ -42,16 +42,18 @@ install_config {
+
-
-
-
-
+
+
+
+
+
diff --git a/repos/gems/run/nano3d.run b/repos/gems/run/nano3d.run
index 4433122293..498458416c 100644
--- a/repos/gems/run/nano3d.run
+++ b/repos/gems/run/nano3d.run
@@ -33,9 +33,9 @@ append config {
+
-
@@ -45,9 +45,11 @@ append config {
-
-
-
+
+
+
+
+
diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run
index ede18bb306..ddbe5e97a8 100644
--- a/repos/gems/run/sculpt.run
+++ b/repos/gems/run/sculpt.run
@@ -99,10 +99,10 @@ install_config {
-
+
-
+
@@ -243,9 +243,9 @@ install_config {
-
-
-
+
+
+
@@ -256,11 +256,11 @@ install_config {
+
-
@@ -269,7 +269,9 @@ install_config {
-
+
+
+
@@ -278,7 +280,6 @@ install_config {
-
@@ -516,11 +517,11 @@ file copy -force [genode_dir]/repos/gems/recipes/raw/drivers_managed-pc/drivers.
[run_dir]/genode/drivers.config
foreach file { en_us.chargen de_ch.chargen de_de.chargen fr_ch.chargen fr_fr.chargen special.chargen } {
- file copy -force [genode_dir]/repos/os/src/server/input_filter/$file \
+ file copy -force [genode_dir]/repos/os/src/server/event_filter/$file \
[run_dir]/genode/$file }
-file copy -force [genode_dir]/repos/gems/recipes/raw/drivers_managed-pc/input_filter.config \
- [run_dir]/genode/input_filter.config
+file copy -force [genode_dir]/repos/gems/recipes/raw/drivers_managed-pc/event_filter.config \
+ [run_dir]/genode/event_filter.config
file copy -force [genode_dir]/repos/gems/recipes/raw/depot_download/depot_download.config \
[run_dir]/genode/depot_download.config
diff --git a/repos/gems/run/sculpt/leitzentrale.config b/repos/gems/run/sculpt/leitzentrale.config
index d0fb426c7d..f3936b7e43 100644
--- a/repos/gems/run/sculpt/leitzentrale.config
+++ b/repos/gems/run/sculpt/leitzentrale.config
@@ -221,8 +221,8 @@
-
-
+
+
diff --git a/repos/gems/run/sculpt/nitpicker.config b/repos/gems/run/sculpt/nitpicker.config
index c043f2d17f..6730f17ffd 100644
--- a/repos/gems/run/sculpt/nitpicker.config
+++ b/repos/gems/run/sculpt/nitpicker.config
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/repos/gems/run/terminal_echo.run b/repos/gems/run/terminal_echo.run
index 8774aa64dd..03e59fd8e1 100644
--- a/repos/gems/run/terminal_echo.run
+++ b/repos/gems/run/terminal_echo.run
@@ -3,6 +3,8 @@ create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_interactive_pkg] \
[depot_user]/pkg/terminal \
+ [depot_user]/src/nitpicker \
+ [depot_user]/src/gui_fb \
[depot_user]/src/init
install_config {
@@ -35,11 +37,32 @@ install_config {
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -57,6 +80,10 @@ install_config {
}
+set fd [open [run_dir]/genode/focus w]
+puts $fd ""
+close $fd
+
build { server/terminal test/terminal_echo }
build_boot_image { terminal test-terminal_echo }
diff --git a/repos/gems/run/terminal_log.run b/repos/gems/run/terminal_log.run
index 522229835e..f3841b7385 100644
--- a/repos/gems/run/terminal_log.run
+++ b/repos/gems/run/terminal_log.run
@@ -42,25 +42,24 @@ install_config {
+
-
-
-
-
+
+
+
+
+
-
-
-
-
+
diff --git a/repos/gems/run/text_area.run b/repos/gems/run/text_area.run
index 29dc3d9ae8..5da2ee3baa 100644
--- a/repos/gems/run/text_area.run
+++ b/repos/gems/run/text_area.run
@@ -42,9 +42,9 @@ install_config {
+
-
@@ -58,9 +58,11 @@ install_config {
-
-
-
+
+
+
+
+
diff --git a/repos/gems/run/text_painter.run b/repos/gems/run/text_painter.run
index f751616ab6..06cdb96c6f 100644
--- a/repos/gems/run/text_painter.run
+++ b/repos/gems/run/text_painter.run
@@ -40,24 +40,23 @@ install_config {
+
-
-
-
-
+
+
+
+
+
-
-
-
-
+
diff --git a/repos/gems/run/wm.run b/repos/gems/run/wm.run
index 8183a24ac3..cd7099ed00 100644
--- a/repos/gems/run/wm.run
+++ b/repos/gems/run/wm.run
@@ -45,16 +45,18 @@ install_config {
+
-
-
-
-
+
+
+
+
+
diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc
index 99eef462ea..071c2b7094 100644
--- a/repos/gems/src/app/sculpt_manager/main.cc
+++ b/repos/gems/src/app/sculpt_manager/main.cc
@@ -106,12 +106,12 @@ struct Sculpt::Main : Input_event_handler,
_handle_gui_mode();
}
- Managed_config _input_filter_config {
- _env, "config", "input_filter", *this, &Main::_handle_input_filter_config };
+ Managed_config _event_filter_config {
+ _env, "config", "event_filter", *this, &Main::_handle_event_filter_config };
- void _handle_input_filter_config(Xml_node)
+ void _handle_event_filter_config(Xml_node)
{
- _input_filter_config.try_generate_manually_managed();
+ _event_filter_config.try_generate_manually_managed();
}
Attached_rom_dataspace _gui_hover { _env, "nitpicker_hover" };
diff --git a/repos/gems/src/test/driver_manager/main.cc b/repos/gems/src/test/driver_manager/main.cc
index 6479b217b5..95f3baa992 100644
--- a/repos/gems/src/test/driver_manager/main.cc
+++ b/repos/gems/src/test/driver_manager/main.cc
@@ -129,11 +129,6 @@ struct Test::Main
Main(Env &env) : _env(env)
{
- if (_config.xml().has_sub_node("check_input")) {
- log("connect to input driver");
- Input::Connection input(_env);
- }
-
_block_devices.sigh(_block_devices_update_handler);
_check_conditions();
}
diff --git a/repos/libports/run/acpica.run b/repos/libports/run/acpica.run
index dc0c9d0b6f..4b36c090da 100644
--- a/repos/libports/run/acpica.run
+++ b/repos/libports/run/acpica.run
@@ -14,10 +14,11 @@ set build_components {
drivers/input
server/acpi_input
server/dynamic_rom
- server/input_filter
+ server/event_filter
server/report_rom
+ server/event_dump
app/acpica
- test/input
+ app/input_event_client
}
set use_acpica_as_acpi_drv 0
@@ -130,22 +131,21 @@ append config {
}
append config {
-
+
-
+
-
-
+
+
-
-
+
}
@@ -162,16 +162,38 @@ append config {
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
}
append config {
+
+
+
+
+
+
+
+
+
+
+
@@ -211,12 +233,13 @@ set boot_modules {
ld.lib.so
timer
ps2_drv
- input_filter
+ event_filter
report_rom
dynamic_rom
acpica
acpi_input
- test-input
+ event_dump
+ input_event_client
}
append_platform_drv_boot_modules
diff --git a/repos/libports/run/mesa.inc b/repos/libports/run/mesa.inc
index f4d4fb31c4..29ec6e712b 100644
--- a/repos/libports/run/mesa.inc
+++ b/repos/libports/run/mesa.inc
@@ -55,16 +55,18 @@ set config {
+
-
-
-
-
+
+
+
+
+
diff --git a/repos/libports/run/mupdf.run b/repos/libports/run/mupdf.run
index 02a9e39af4..7078205a76 100644
--- a/repos/libports/run/mupdf.run
+++ b/repos/libports/run/mupdf.run
@@ -41,16 +41,18 @@ set config {
+
-
-
-
-
+
+
+
+
+
diff --git a/repos/libports/run/qt5_common.inc b/repos/libports/run/qt5_common.inc
index 24e1005f2e..ef7dff10f7 100644
--- a/repos/libports/run/qt5_common.inc
+++ b/repos/libports/run/qt5_common.inc
@@ -70,30 +70,23 @@ proc qt5_parent_provides { } {
#
proc language_chargen { } { return "en_us" }
-exec cp -f [genode_dir]/repos/os/src/server/input_filter/[language_chargen].chargen bin/
-exec cp -f [genode_dir]/repos/os/src/server/input_filter/special.chargen bin/
+exec cp -f [genode_dir]/repos/os/src/server/event_filter/[language_chargen].chargen bin/
+exec cp -f [genode_dir]/repos/os/src/server/event_filter/special.chargen bin/
-set qt5_input_filter_config {
- }
-append_if [have_spec ps2] qt5_input_filter_config {
- }
-append_if [have_spec usb] qt5_input_filter_config {
- }
-append_if [have_spec linux] qt5_input_filter_config {
- }
-append qt5_input_filter_config {
+set qt5_event_filter_config {
+
-
-}
+ }
+append_if [have_spec ps2] qt5_event_filter_config {
+ }
+append_if [have_spec usb] qt5_event_filter_config {
+ }
+append_if [have_spec linux] qt5_event_filter_config {
+ }
+append qt5_event_filter_config {
+ }
-set fd [open bin/qt5_input_filter.config w]
-puts $fd $qt5_input_filter_config
+set fd [open bin/qt5_event_filter.config w]
+puts $fd $qt5_event_filter_config
close $fd
@@ -169,30 +168,32 @@ proc qt5_start_nodes { } {
-
+
-
-
-
+
+
+
+
-
-
+
+
+
-
-
+
+
@@ -240,7 +241,7 @@ proc qt5_start_nodes { } {
-
+
@@ -331,5 +332,5 @@ proc qt5_boot_modules { } {
lappend boot_modules [language_chargen].chargen
lappend boot_modules special.chargen
- lappend boot_modules qt5_input_filter.config
+ lappend boot_modules qt5_event_filter.config
}
diff --git a/repos/os/recipes/pkg/drivers_interactive-linux/archives b/repos/os/recipes/pkg/drivers_interactive-linux/archives
index 11d4a2de0a..75435a211d 100644
--- a/repos/os/recipes/pkg/drivers_interactive-linux/archives
+++ b/repos/os/recipes/pkg/drivers_interactive-linux/archives
@@ -1,4 +1,3 @@
_/src/fb_sdl
-_/src/input_filter
-_/src/input_event_bridge
+_/src/event_filter
_/raw/drivers_interactive-linux
diff --git a/repos/os/recipes/pkg/drivers_interactive-muen/archives b/repos/os/recipes/pkg/drivers_interactive-muen/archives
index 7d44b2f81a..9d3ee359b0 100644
--- a/repos/os/recipes/pkg/drivers_interactive-muen/archives
+++ b/repos/os/recipes/pkg/drivers_interactive-muen/archives
@@ -2,5 +2,6 @@ _/src/platform_drv
_/src/ps2_drv
_/src/usb_drv
_/src/vesa_drv
-_/src/input_filter
+_/src/event_filter
+_/src/input_event_client
_/raw/drivers_interactive-muen
diff --git a/repos/os/recipes/pkg/drivers_interactive-pbxa9/archives b/repos/os/recipes/pkg/drivers_interactive-pbxa9/archives
index cacf1cff69..5a1b05cdcb 100644
--- a/repos/os/recipes/pkg/drivers_interactive-pbxa9/archives
+++ b/repos/os/recipes/pkg/drivers_interactive-pbxa9/archives
@@ -1,4 +1,5 @@
_/src/pbxa9_drivers
_/src/platform_drv
-_/src/input_filter
+_/src/event_filter
+_/src/input_event_client
_/raw/drivers_interactive-pbxa9
diff --git a/repos/os/recipes/pkg/drivers_interactive-pc/archives b/repos/os/recipes/pkg/drivers_interactive-pc/archives
index 8e6555982d..14e05d9899 100644
--- a/repos/os/recipes/pkg/drivers_interactive-pc/archives
+++ b/repos/os/recipes/pkg/drivers_interactive-pc/archives
@@ -4,5 +4,6 @@ _/src/ps2_drv
_/src/usb_drv
_/src/vesa_drv
_/src/report_rom
-_/src/input_filter
+_/src/event_filter
+_/src/input_event_client
_/raw/drivers_interactive-pc
diff --git a/repos/os/recipes/raw/drivers_interactive-imx53_qsb/drivers.config b/repos/os/recipes/raw/drivers_interactive-imx53_qsb/drivers.config
index f9b7f49345..c6a3c7d43f 100644
--- a/repos/os/recipes/raw/drivers_interactive-imx53_qsb/drivers.config
+++ b/repos/os/recipes/raw/drivers_interactive-imx53_qsb/drivers.config
@@ -15,9 +15,6 @@
-
-
-
@@ -71,14 +68,4 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/repos/os/recipes/raw/drivers_interactive-linux/content.mk b/repos/os/recipes/raw/drivers_interactive-linux/content.mk
index a6ef537fce..1d893aa1dd 100644
--- a/repos/os/recipes/raw/drivers_interactive-linux/content.mk
+++ b/repos/os/recipes/raw/drivers_interactive-linux/content.mk
@@ -1,7 +1,7 @@
-content: drivers.config input_filter.config en_us.chargen special.chargen
+content: drivers.config event_filter.config en_us.chargen special.chargen
-drivers.config input_filter.config:
+drivers.config event_filter.config:
cp $(REP_DIR)/recipes/raw/drivers_interactive-linux/$@ $@
en_us.chargen special.chargen:
- cp $(REP_DIR)/src/server/input_filter/$@ $@
+ cp $(REP_DIR)/src/server/event_filter/$@ $@
diff --git a/repos/os/recipes/raw/drivers_interactive-linux/drivers.config b/repos/os/recipes/raw/drivers_interactive-linux/drivers.config
index caafabec9f..45c80b50b2 100644
--- a/repos/os/recipes/raw/drivers_interactive-linux/drivers.config
+++ b/repos/os/recipes/raw/drivers_interactive-linux/drivers.config
@@ -6,37 +6,28 @@
+
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
+
+
diff --git a/repos/os/recipes/raw/drivers_interactive-linux/input_filter.config b/repos/os/recipes/raw/drivers_interactive-linux/event_filter.config
similarity index 95%
rename from repos/os/recipes/raw/drivers_interactive-linux/input_filter.config
rename to repos/os/recipes/raw/drivers_interactive-linux/event_filter.config
index 7c5380c69c..2926b86e6e 100644
--- a/repos/os/recipes/raw/drivers_interactive-linux/input_filter.config
+++ b/repos/os/recipes/raw/drivers_interactive-linux/event_filter.config
@@ -1,5 +1,4 @@
-
+
diff --git a/repos/os/recipes/raw/drivers_interactive-muen/content.mk b/repos/os/recipes/raw/drivers_interactive-muen/content.mk
index b9d8888867..38b5b0334f 100644
--- a/repos/os/recipes/raw/drivers_interactive-muen/content.mk
+++ b/repos/os/recipes/raw/drivers_interactive-muen/content.mk
@@ -1,7 +1,7 @@
-content: drivers.config fb_drv.config input_filter.config en_us.chargen special.chargen
+content: drivers.config fb_drv.config event_filter.config en_us.chargen special.chargen
-drivers.config fb_drv.config input_filter.config:
+drivers.config fb_drv.config event_filter.config:
cp $(REP_DIR)/recipes/raw/drivers_interactive-muen/$@ $@
en_us.chargen special.chargen:
- cp $(REP_DIR)/src/server/input_filter/$@ $@
+ cp $(REP_DIR)/src/server/event_filter/$@ $@
diff --git a/repos/os/recipes/raw/drivers_interactive-muen/drivers.config b/repos/os/recipes/raw/drivers_interactive-muen/drivers.config
index e869ebe6c5..1951a5ed35 100644
--- a/repos/os/recipes/raw/drivers_interactive-muen/drivers.config
+++ b/repos/os/recipes/raw/drivers_interactive-muen/drivers.config
@@ -11,13 +11,11 @@
+
-
-
-
@@ -85,13 +83,12 @@
-
+
-
+
-
-
-
+
+
@@ -100,4 +97,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/repos/os/recipes/raw/drivers_interactive-muen/input_filter.config b/repos/os/recipes/raw/drivers_interactive-muen/event_filter.config
similarity index 88%
rename from repos/os/recipes/raw/drivers_interactive-muen/input_filter.config
rename to repos/os/recipes/raw/drivers_interactive-muen/event_filter.config
index ca04c44bef..7df670248e 100644
--- a/repos/os/recipes/raw/drivers_interactive-muen/input_filter.config
+++ b/repos/os/recipes/raw/drivers_interactive-muen/event_filter.config
@@ -1,6 +1,4 @@
-
-
+
+
diff --git a/repos/os/recipes/raw/drivers_interactive-pbxa9/content.mk b/repos/os/recipes/raw/drivers_interactive-pbxa9/content.mk
index adddfc4e2f..a7d24fc7c8 100644
--- a/repos/os/recipes/raw/drivers_interactive-pbxa9/content.mk
+++ b/repos/os/recipes/raw/drivers_interactive-pbxa9/content.mk
@@ -1,7 +1,7 @@
-content: drivers.config input_filter.config en_us.chargen special.chargen
+content: drivers.config event_filter.config en_us.chargen special.chargen
-drivers.config input_filter.config:
+drivers.config event_filter.config:
cp $(REP_DIR)/recipes/raw/drivers_interactive-pbxa9/$@ $@
en_us.chargen special.chargen:
- cp $(REP_DIR)/src/server/input_filter/$@ $@
+ cp $(REP_DIR)/src/server/event_filter/$@ $@
diff --git a/repos/os/recipes/raw/drivers_interactive-pbxa9/drivers.config b/repos/os/recipes/raw/drivers_interactive-pbxa9/drivers.config
index 8913739bef..0a64cca71d 100644
--- a/repos/os/recipes/raw/drivers_interactive-pbxa9/drivers.config
+++ b/repos/os/recipes/raw/drivers_interactive-pbxa9/drivers.config
@@ -8,13 +8,11 @@
+
-
-
-
@@ -91,21 +89,30 @@
-
+
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/repos/os/recipes/raw/drivers_interactive-pbxa9/input_filter.config b/repos/os/recipes/raw/drivers_interactive-pbxa9/event_filter.config
similarity index 95%
rename from repos/os/recipes/raw/drivers_interactive-pbxa9/input_filter.config
rename to repos/os/recipes/raw/drivers_interactive-pbxa9/event_filter.config
index 056d9fa47b..55cdbc6167 100644
--- a/repos/os/recipes/raw/drivers_interactive-pbxa9/input_filter.config
+++ b/repos/os/recipes/raw/drivers_interactive-pbxa9/event_filter.config
@@ -1,5 +1,4 @@
-
+
diff --git a/repos/os/recipes/raw/drivers_interactive-pc/content.mk b/repos/os/recipes/raw/drivers_interactive-pc/content.mk
index 6050a65b23..6a6fac4af4 100644
--- a/repos/os/recipes/raw/drivers_interactive-pc/content.mk
+++ b/repos/os/recipes/raw/drivers_interactive-pc/content.mk
@@ -1,7 +1,7 @@
-content: drivers.config fb_drv.config input_filter.config en_us.chargen special.chargen
+content: drivers.config fb_drv.config event_filter.config en_us.chargen special.chargen
-drivers.config fb_drv.config input_filter.config:
+drivers.config fb_drv.config event_filter.config:
cp $(REP_DIR)/recipes/raw/drivers_interactive-pc/$@ $@
en_us.chargen special.chargen:
- cp $(REP_DIR)/src/server/input_filter/$@ $@
+ cp $(REP_DIR)/src/server/event_filter/$@ $@
diff --git a/repos/os/recipes/raw/drivers_interactive-pc/drivers.config b/repos/os/recipes/raw/drivers_interactive-pc/drivers.config
index d873d9f766..cfaa79269a 100644
--- a/repos/os/recipes/raw/drivers_interactive-pc/drivers.config
+++ b/repos/os/recipes/raw/drivers_interactive-pc/drivers.config
@@ -11,13 +11,11 @@
+
-
-
-
@@ -118,13 +116,12 @@
-
+
-
+
-
-
-
+
+
@@ -133,4 +130,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/repos/os/recipes/raw/drivers_interactive-pc/input_filter.config b/repos/os/recipes/raw/drivers_interactive-pc/event_filter.config
similarity index 91%
rename from repos/os/recipes/raw/drivers_interactive-pc/input_filter.config
rename to repos/os/recipes/raw/drivers_interactive-pc/event_filter.config
index ca04c44bef..0f78370f9a 100644
--- a/repos/os/recipes/raw/drivers_interactive-pc/input_filter.config
+++ b/repos/os/recipes/raw/drivers_interactive-pc/event_filter.config
@@ -1,6 +1,4 @@
-
-
+
+
diff --git a/repos/os/recipes/src/input_filter/content.mk b/repos/os/recipes/src/event_filter/content.mk
similarity index 62%
rename from repos/os/recipes/src/input_filter/content.mk
rename to repos/os/recipes/src/event_filter/content.mk
index 0bdae927f7..10ffb6a10c 100644
--- a/repos/os/recipes/src/input_filter/content.mk
+++ b/repos/os/recipes/src/event_filter/content.mk
@@ -1,2 +1,2 @@
-SRC_DIR = src/server/input_filter
+SRC_DIR = src/server/event_filter
include $(GENODE_DIR)/repos/base/recipes/src/content.inc
diff --git a/repos/os/recipes/src/event_filter/hash b/repos/os/recipes/src/event_filter/hash
new file mode 100644
index 0000000000..e8bd69e0a3
--- /dev/null
+++ b/repos/os/recipes/src/event_filter/hash
@@ -0,0 +1 @@
+2020-07-16 b70ed9b9578b7d5713d61bbe4fff8d418d7f9304
diff --git a/repos/os/recipes/src/input_filter/used_apis b/repos/os/recipes/src/event_filter/used_apis
similarity index 61%
rename from repos/os/recipes/src/input_filter/used_apis
rename to repos/os/recipes/src/event_filter/used_apis
index ab9bfd369a..d31fcefc0c 100644
--- a/repos/os/recipes/src/input_filter/used_apis
+++ b/repos/os/recipes/src/event_filter/used_apis
@@ -1,4 +1,4 @@
base
os
-input_session
+event_session
timer_session
diff --git a/repos/os/recipes/src/imx53_qsb_drivers/content.mk b/repos/os/recipes/src/imx53_qsb_drivers/content.mk
index 4dcae22fae..97899c910f 100644
--- a/repos/os/recipes/src/imx53_qsb_drivers/content.mk
+++ b/repos/os/recipes/src/imx53_qsb_drivers/content.mk
@@ -7,9 +7,8 @@ include/gpio:
cp -r $(REP_DIR)/include/gpio $@
src/drivers:
- mkdir -p $@/framebuffer/spec $@/input $@/gpio/spec
+ mkdir -p $@/framebuffer/spec $@/gpio/spec
cp -r $(REP_DIR)/src/drivers/gpio/spec/imx $@/gpio/spec/
cp -r $(REP_DIR)/src/drivers/gpio/spec/imx53 $@/gpio/spec/
cp -r $(REP_DIR)/src/drivers/framebuffer/spec/imx53 $@/framebuffer/spec/
cp -r $(REP_DIR)/include/spec/imx53/imx_framebuffer_session $@/framebuffer/spec/imx53/
- cp -r $(REP_DIR)/src/drivers/input/dummy $@/input/
diff --git a/repos/os/recipes/src/input_filter/hash b/repos/os/recipes/src/input_filter/hash
deleted file mode 100644
index df22b8209b..0000000000
--- a/repos/os/recipes/src/input_filter/hash
+++ /dev/null
@@ -1 +0,0 @@
-2020-07-12 a498492b515f8bb5ebf76b61de13b8aeea6bf012
diff --git a/repos/os/run/demo.run b/repos/os/run/demo.run
index ade5358b1d..086587e19a 100644
--- a/repos/os/run/demo.run
+++ b/repos/os/run/demo.run
@@ -48,9 +48,9 @@ install_config {
+
-
@@ -75,11 +75,12 @@ install_config {
-
+
-
+
-
+
-
+
-
+
+
+
+
-
-
+
+
@@ -111,8 +114,6 @@ append config {
-
-
+
+
@@ -144,8 +147,8 @@ append config {
-
+
@@ -153,7 +156,6 @@ append config {
-
@@ -161,11 +163,12 @@ append config {
+
+
-
+
@@ -203,7 +207,6 @@ append_if [test_char_repeat] config {
-
+
@@ -234,7 +238,6 @@ append config {
-
+
@@ -270,7 +274,6 @@ append config {
-
+
@@ -320,7 +324,6 @@ append config {
-
+
@@ -359,12 +363,12 @@ append config {
-
+
@@ -380,12 +384,12 @@ append config {
-
+
@@ -411,13 +415,13 @@ append config {
-
+
@@ -425,13 +429,13 @@ append config {
-
+
@@ -440,13 +444,13 @@ append config {
-
+
@@ -457,13 +461,13 @@ append config {
-
+
@@ -481,7 +485,7 @@ append config {
-
+
@@ -497,11 +501,11 @@ install_config $config
#
set boot_modules { core ld.lib.so init timer report_rom
- input_filter test-input_filter }
+ event_filter test-event_filter }
build_boot_image $boot_modules
append qemu_args " -nographic "
-run_genode_until {.*child "test-input_filter" exited with exit value 0.*} 60
+run_genode_until {.*child "test-event_filter" exited with exit value 0.*} 60
diff --git a/repos/os/run/fb_bench.run b/repos/os/run/fb_bench.run
index 9f6031142a..dbbe574185 100644
--- a/repos/os/run/fb_bench.run
+++ b/repos/os/run/fb_bench.run
@@ -49,23 +49,22 @@ install_config {
+
-
-
-
-
+
+
+
+
+
-
-
-
-
+
diff --git a/repos/os/run/framebuffer.run b/repos/os/run/framebuffer.run
index af4b9418bb..31a03b4e6b 100644
--- a/repos/os/run/framebuffer.run
+++ b/repos/os/run/framebuffer.run
@@ -3,7 +3,7 @@ import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_interactive_pkg] \
[depot_user]/src/init
-build { test/framebuffer }
+build { server/event_dump test/framebuffer }
install_config {
@@ -34,9 +34,15 @@ install_config {
+
-
+
+
+
+
+
+
@@ -44,7 +50,9 @@ install_config {
+
}
-build_boot_image { test-framebuffer }
+build_boot_image { event_dump test-framebuffer }
+
run_genode_until forever
diff --git a/repos/os/run/loader.run b/repos/os/run/loader.run
index 2e8ed9f9b7..e80f0eb006 100644
--- a/repos/os/run/loader.run
+++ b/repos/os/run/loader.run
@@ -38,16 +38,18 @@ install_config {
+
-
-
-
-
+
+
+
+
+
diff --git a/repos/os/run/pointer.run b/repos/os/run/pointer.run
index f99eae560e..4b51fdafbf 100644
--- a/repos/os/run/pointer.run
+++ b/repos/os/run/pointer.run
@@ -12,7 +12,6 @@ set build_components {
server/report_rom
server/dynamic_rom
server/nitpicker
- server/input_event_bridge
app/pointer
test/pointer
test/nitpicker
@@ -50,17 +49,7 @@ set config {
-
-
-
-
-
-
-
-
-
-
-
+
@@ -71,11 +60,9 @@ set config {
-
+
-
-
@@ -93,28 +80,30 @@ set config {
+
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -132,6 +121,7 @@ set config {
+
@@ -146,6 +136,7 @@ set config {
+
@@ -160,6 +151,7 @@ set config {
+
@@ -184,6 +176,7 @@ set config {
+
@@ -227,6 +220,7 @@ set config {
+
@@ -239,6 +233,7 @@ set config {
+
@@ -251,6 +246,7 @@ set config {
+
@@ -263,6 +259,7 @@ set config {
+
@@ -292,7 +289,6 @@ set boot_modules {
pointer
test-pointer
testnit
- input_event_bridge
}
# "lsort -unique" removes duplicates but core must be first
diff --git a/repos/os/src/server/input_filter/README b/repos/os/src/server/event_filter/README
similarity index 94%
rename from repos/os/src/server/input_filter/README
rename to repos/os/src/server/event_filter/README
index 32707b3914..87aa2992bc 100644
--- a/repos/os/src/server/input_filter/README
+++ b/repos/os/src/server/event_filter/README
@@ -4,7 +4,7 @@ This component transforms input events originating from multiple sources.
Configuration
-------------
-An input-filter configuration consists of two parts, a declaration of
+An event-filter configuration consists of two parts, a declaration of
input sources ("Input" connections) that the component should request,
and the definition of a filter chain. Each input source is defined via
an '' node with the name of the input source as 'name' attribute and
@@ -120,7 +120,7 @@ sub nodes:
generated instantly on key press but only after the sequence is
completed. If an unfinished sequence can't be completed due to an
unmatched character, the sequence is aborted and no character is
- generated. input_filter supports sequences of up to four characters.
+ generated. Sequences of up to four characters are supported.
For example, the French AZERTY keyboard layout [1] has a dead key
for Circumflex Accent "^" right of the P key (which is bracket left
@@ -165,11 +165,11 @@ sub nodes:
Additional features
-------------------
-The input filter is able to respond to configuration updates as well as updates
+The event filter is able to respond to configuration updates as well as updates
of included ROM modules. However, a new configuration is applied only if the
input sources are in their idle state - that is, no key is pressed. This
ensures the consistency of the generated key events (for each press event there
-must be a corresponding release event), on which clients of the input filter
+must be a corresponding release event), on which clients of the event filter
may depend. However, this deferred reconfiguration can be overridden by setting
the 'force' attribute of the '' node to 'yes'. If forced, the new
configuration is applied immediately.
@@ -178,7 +178,7 @@ configuration is applied immediately.
Examples
--------
-An automated test that exercises various corner cases of the input filter
-can be found at _os/run/input_filter.run_. For a practical example of how
-to use the input filter with the terminal, please refer to the
+An automated test that exercises various corner cases of the event filter
+can be found at _os/run/event_filter.run_. For a practical example of how
+to use the event filter with the terminal, please refer to the
_gems/run/terminal_echo.run_ script.
diff --git a/repos/os/src/server/input_filter/accelerate_source.h b/repos/os/src/server/event_filter/accelerate_source.h
similarity index 84%
rename from repos/os/src/server/input_filter/accelerate_source.h
rename to repos/os/src/server/event_filter/accelerate_source.h
index 6226193539..2ad11941f7 100644
--- a/repos/os/src/server/input_filter/accelerate_source.h
+++ b/repos/os/src/server/event_filter/accelerate_source.h
@@ -11,8 +11,8 @@
* under the terms of the GNU Affero General Public License version 3.
*/
-#ifndef _INPUT_FILTER__ACCELERATE_SOURCE_H_
-#define _INPUT_FILTER__ACCELERATE_SOURCE_H_
+#ifndef _EVENT_FILTER__ACCELERATE_SOURCE_H_
+#define _EVENT_FILTER__ACCELERATE_SOURCE_H_
/* Genode includes */
#include
@@ -22,10 +22,10 @@
#include
#include
-namespace Input_filter { class Accelerate_source; }
+namespace Event_filter { class Accelerate_source; }
-class Input_filter::Accelerate_source : public Source, Source::Filter
+class Event_filter::Accelerate_source : public Source, Source::Filter
{
private:
@@ -86,14 +86,12 @@ class Input_filter::Accelerate_source : public Source, Source::Filter
*/
void filter_event(Sink &destination, Input::Event const &event) override
{
- using namespace Input;
-
- Event ev = event;
+ Input::Event ev = event;
ev.handle_relative_motion([&] (int x, int y) {
- ev = Relative_motion{_apply_acceleration(x),
- _apply_acceleration(y)}; });
- destination.submit_event(ev);
+ ev = Input::Relative_motion{_apply_acceleration(x),
+ _apply_acceleration(y)}; });
+ destination.submit(ev);
}
public:
@@ -116,4 +114,4 @@ class Input_filter::Accelerate_source : public Source, Source::Filter
}
};
-#endif /* _INPUT_FILTER__ACCELERATE_SOURCE_H_ */
+#endif /* _EVENT_FILTER__ACCELERATE_SOURCE_H_ */
diff --git a/repos/os/src/server/input_filter/button_scroll_source.h b/repos/os/src/server/event_filter/button_scroll_source.h
similarity index 91%
rename from repos/os/src/server/input_filter/button_scroll_source.h
rename to repos/os/src/server/event_filter/button_scroll_source.h
index afd30d7130..1d75b9770f 100644
--- a/repos/os/src/server/input_filter/button_scroll_source.h
+++ b/repos/os/src/server/event_filter/button_scroll_source.h
@@ -11,8 +11,8 @@
* under the terms of the GNU Affero General Public License version 3.
*/
-#ifndef _INPUT_FILTER__BUTTON_SCROLL_SOURCE_H_
-#define _INPUT_FILTER__BUTTON_SCROLL_SOURCE_H_
+#ifndef _EVENT_FILTER__BUTTON_SCROLL_SOURCE_H_
+#define _EVENT_FILTER__BUTTON_SCROLL_SOURCE_H_
/* Genode includes */
#include
@@ -21,10 +21,10 @@
#include
#include
-namespace Input_filter { class Button_scroll_source; }
+namespace Event_filter { class Button_scroll_source; }
-class Input_filter::Button_scroll_source : public Source, Source::Filter
+class Event_filter::Button_scroll_source : public Source, Source::Filter
{
private:
@@ -167,7 +167,7 @@ class Input_filter::Button_scroll_source : public Source, Source::Filter
wheel_y = _vertical_wheel .pending_motion();
if (wheel_x || wheel_y)
- destination.submit_event(Input::Wheel{wheel_x, wheel_y});
+ destination.submit(Input::Wheel{wheel_x, wheel_y});
/*
* Submit both press event and release event of magic button at
@@ -185,8 +185,8 @@ class Input_filter::Button_scroll_source : public Source, Source::Filter
if (_vertical_wheel .handle_deactivation(event)
| _horizontal_wheel.handle_deactivation(event)) {
- destination.submit_event(Input::Press{key});
- destination.submit_event(Input::Release{key});
+ destination.submit(Input::Press{key});
+ destination.submit(Input::Release{key});
}
});
return;
@@ -196,7 +196,7 @@ class Input_filter::Button_scroll_source : public Source, Source::Filter
if (_vertical_wheel .suppressed(event)) return;
if (_horizontal_wheel.suppressed(event)) return;
- destination.submit_event(event);
+ destination.submit(event);
}
static Xml_node _sub_node(Xml_node node, char const *type)
@@ -224,4 +224,4 @@ class Input_filter::Button_scroll_source : public Source, Source::Filter
}
};
-#endif /* _INPUT_FILTER__BUTTON_SCROLL_SOURCE_H_ */
+#endif /* _EVENT_FILTER__BUTTON_SCROLL_SOURCE_H_ */
diff --git a/repos/os/src/server/input_filter/chargen_source.h b/repos/os/src/server/event_filter/chargen_source.h
similarity index 97%
rename from repos/os/src/server/input_filter/chargen_source.h
rename to repos/os/src/server/event_filter/chargen_source.h
index 5bc665555b..2f09c43138 100644
--- a/repos/os/src/server/input_filter/chargen_source.h
+++ b/repos/os/src/server/event_filter/chargen_source.h
@@ -11,8 +11,8 @@
* under the terms of the GNU Affero General Public License version 3.
*/
-#ifndef _INPUT_FILTER__CHARGEN_SOURCE_H_
-#define _INPUT_FILTER__CHARGEN_SOURCE_H_
+#ifndef _EVENT_FILTER__CHARGEN_SOURCE_H_
+#define _EVENT_FILTER__CHARGEN_SOURCE_H_
/* Genode includes */
#include
@@ -22,10 +22,10 @@
#include
#include
-namespace Input_filter { class Chargen_source; }
+namespace Event_filter { class Chargen_source; }
-class Input_filter::Chargen_source : public Source, Source::Filter
+class Event_filter::Chargen_source : public Source, Source::Filter
{
private:
@@ -544,9 +544,9 @@ class Input_filter::Chargen_source : public Source, Source::Filter
void emit_events(Source::Sink &destination)
{
for (unsigned i = 0; i < _pending_event_count; i++) {
- destination.submit_event(Input::Press_char{Input::KEY_UNKNOWN,
- _curr_character});
- destination.submit_event(Input::Release{Input::KEY_UNKNOWN});
+ destination.submit(Input::Press_char{Input::KEY_UNKNOWN,
+ _curr_character});
+ destination.submit(Input::Release{Input::KEY_UNKNOWN});
}
_pending_event_count = 0;
@@ -619,7 +619,7 @@ class Input_filter::Chargen_source : public Source, Source::Filter
});
/* forward filtered event */
- destination.submit_event(ev);
+ destination.submit(ev);
}
Source &_source;
@@ -761,4 +761,4 @@ class Input_filter::Chargen_source : public Source, Source::Filter
}
};
-#endif /* _INPUT_FILTER__CHARGEN_SOURCE_H_ */
+#endif /* _EVENT_FILTER__CHARGEN_SOURCE_H_ */
diff --git a/repos/os/src/server/input_filter/de_ch.chargen b/repos/os/src/server/event_filter/de_ch.chargen
similarity index 100%
rename from repos/os/src/server/input_filter/de_ch.chargen
rename to repos/os/src/server/event_filter/de_ch.chargen
diff --git a/repos/os/src/server/input_filter/de_de.chargen b/repos/os/src/server/event_filter/de_de.chargen
similarity index 100%
rename from repos/os/src/server/input_filter/de_de.chargen
rename to repos/os/src/server/event_filter/de_de.chargen
diff --git a/repos/os/src/server/input_filter/en_us.chargen b/repos/os/src/server/event_filter/en_us.chargen
similarity index 100%
rename from repos/os/src/server/input_filter/en_us.chargen
rename to repos/os/src/server/event_filter/en_us.chargen
diff --git a/repos/os/src/server/input_filter/en_workman.chargen b/repos/os/src/server/event_filter/en_workman.chargen
similarity index 100%
rename from repos/os/src/server/input_filter/en_workman.chargen
rename to repos/os/src/server/event_filter/en_workman.chargen
diff --git a/repos/os/src/server/event_filter/event_session.h b/repos/os/src/server/event_filter/event_session.h
new file mode 100644
index 0000000000..554c20bfe6
--- /dev/null
+++ b/repos/os/src/server/event_filter/event_session.h
@@ -0,0 +1,218 @@
+/*
+ * \brief Event service
+ * \author Norman Feske
+ * \date 2020-07-16
+ */
+
+/*
+ * Copyright (C) 2020 Genode Labs GmbH
+ *
+ * This file is part of the Genode OS framework, which is distributed
+ * under the terms of the GNU Affero General Public License version 3.
+ */
+
+#ifndef _EVENT_FILTER__EVENT_SESSION_H_
+#define _EVENT_FILTER__EVENT_SESSION_H_
+
+/* Genode includes */
+#include
+#include
+#include
+#include
+#include
+#include
+
+/* local includes */
+#include
+
+namespace Event_filter {
+
+ typedef String Input_name;
+
+ class Event_session;
+ class Event_root;
+}
+
+
+class Event_filter::Event_session : public Session_object
+{
+ private:
+
+ Input_name _input_name { }; /* may change on reconfiguration */
+
+ Source::Trigger &_trigger;
+
+ Constrained_ram_allocator _ram;
+
+ Attached_ram_dataspace _ds;
+
+ unsigned _pending_count = 0;
+
+ unsigned _key_cnt = 0;
+
+ template
+ void _for_each_pending_event(FN const &fn) const
+ {
+ Input::Event const * const events = _ds.local_addr();
+
+ for (unsigned i = 0; i < _pending_count; i++)
+ fn(events[i]);
+ }
+
+ public:
+
+ Event_session(Env &env,
+ Resources const &resources,
+ Label const &label,
+ Diag const &diag,
+ Source::Trigger &trigger)
+ :
+ Session_object(env.ep(), resources, label, diag),
+ _trigger(trigger),
+ _ram(env.ram(), _ram_quota_guard(), _cap_quota_guard()),
+ _ds(_ram, env.rm(), 4096)
+ { }
+
+ /**
+ * Collect pending input from event client
+ *
+ * \param input_name name of queried input
+ *
+ * This method is called during processing of 'Main::trigger_generate'.
+ */
+ template
+ void for_each_pending_event(Input_name const &input_name, FN const &fn) const
+ {
+ if (input_name == _input_name)
+ _for_each_pending_event(fn);
+ }
+
+ bool idle() const { return (_key_cnt == 0); }
+
+ /**
+ * (Re-)assign input name to session according to session policy
+ */
+ void assign_input_name(Xml_node config)
+ {
+ _input_name = Input_name();
+
+ try {
+ Session_policy policy(_label, config);
+
+ _input_name = policy.attribute_value("input", Input_name());
+
+ } catch (Service_denied) { }
+ }
+
+
+ /*****************************
+ ** Event session interface **
+ *****************************/
+
+ Dataspace_capability dataspace() { return _ds.cap(); }
+
+ void submit_batch(unsigned const count)
+ {
+ size_t const max_events = _ds.size() / sizeof(Input::Event);
+
+ if (count > max_events)
+ warning("number of events exceeds dataspace capacity");
+
+ _pending_count = min(count, max_events);
+
+ auto update_key_cnt = [&] (Input::Event const &event)
+ {
+ if (event.press()) _key_cnt++;
+ if (event.release()) _key_cnt--;
+ };
+
+ _for_each_pending_event(update_key_cnt);
+
+ _trigger.trigger_generate();
+
+ _pending_count = 0;
+ }
+};
+
+
+class Event_filter::Event_root : public Root_component
+{
+ private:
+
+ Env &_env;
+
+ Source::Trigger &_trigger;
+
+ Attached_rom_dataspace const &_config;
+
+ Registry> _sessions { };
+
+ protected:
+
+ Event_session *_create_session(const char *args) override
+ {
+ Event_session &session = *new (md_alloc())
+ Registered(_sessions,
+ _env,
+ session_resources_from_args(args),
+ session_label_from_args(args),
+ session_diag_from_args(args),
+ _trigger);
+
+ session.assign_input_name(_config.xml());
+
+ return &session;
+ }
+
+ void _upgrade_session(Event_session *s, const char *args) override
+ {
+ s->upgrade(ram_quota_from_args(args));
+ s->upgrade(cap_quota_from_args(args));
+ }
+
+ void _destroy_session(Event_session *session) override
+ {
+ Genode::destroy(md_alloc(), session);
+ }
+
+ public:
+
+ /**
+ * Constructor
+ */
+ Event_root(Env &env, Allocator &md_alloc, Source::Trigger &trigger,
+ Attached_rom_dataspace const &config)
+ :
+ Root_component(&env.ep().rpc_ep(), &md_alloc),
+ _env(env), _trigger(trigger), _config(config)
+ { }
+
+ template
+ void for_each_pending_event(Input_name const &input_name, FN const &fn) const
+ {
+ _sessions.for_each([&] (Event_session const &session) {
+ session.for_each_pending_event(input_name, fn); });
+ }
+
+ /**
+ * Return true if no client holds any keys pressed
+ */
+ bool all_sessions_idle() const
+ {
+ bool idle = true;
+
+ _sessions.for_each([&] (Event_session const &session) {
+ if (!session.idle())
+ idle = false; });
+
+ return idle;
+ }
+
+ void apply_config(Xml_node const &config)
+ {
+ _sessions.for_each([&] (Event_session &session) {
+ session.assign_input_name(config); });
+ }
+};
+
+#endif /* _EVENT_FILTER__EVENT_SESSION_H_ */
diff --git a/repos/os/src/server/input_filter/fr_ch.chargen b/repos/os/src/server/event_filter/fr_ch.chargen
similarity index 100%
rename from repos/os/src/server/input_filter/fr_ch.chargen
rename to repos/os/src/server/event_filter/fr_ch.chargen
diff --git a/repos/os/src/server/input_filter/fr_fr.chargen b/repos/os/src/server/event_filter/fr_fr.chargen
similarity index 100%
rename from repos/os/src/server/input_filter/fr_fr.chargen
rename to repos/os/src/server/event_filter/fr_fr.chargen
diff --git a/repos/os/src/server/input_filter/include_accessor.h b/repos/os/src/server/event_filter/include_accessor.h
similarity index 83%
rename from repos/os/src/server/input_filter/include_accessor.h
rename to repos/os/src/server/event_filter/include_accessor.h
index 4df98095d4..eb44f6567e 100644
--- a/repos/os/src/server/input_filter/include_accessor.h
+++ b/repos/os/src/server/event_filter/include_accessor.h
@@ -11,8 +11,8 @@
* under the terms of the GNU Affero General Public License version 3.
*/
-#ifndef _INPUT_FILTER__INCLUDE_ACCESSOR_H_
-#define _INPUT_FILTER__INCLUDE_ACCESSOR_H_
+#ifndef _EVENT_FILTER__INCLUDE_ACCESSOR_H_
+#define _EVENT_FILTER__INCLUDE_ACCESSOR_H_
/* Genode includes */
#include
@@ -20,10 +20,10 @@
/* local includes */
#include
-namespace Input_filter { struct Include_accessor; }
+namespace Event_filter { struct Include_accessor; }
-class Input_filter::Include_accessor : Interface
+class Event_filter::Include_accessor : Interface
{
public:
@@ -64,4 +64,4 @@ class Input_filter::Include_accessor : Interface
}
};
-#endif /* _INPUT_FILTER__INCLUDE_ACCESSOR_H_ */
+#endif /* _EVENT_FILTER__INCLUDE_ACCESSOR_H_ */
diff --git a/repos/os/src/server/event_filter/input_source.h b/repos/os/src/server/event_filter/input_source.h
new file mode 100644
index 0000000000..350a102414
--- /dev/null
+++ b/repos/os/src/server/event_filter/input_source.h
@@ -0,0 +1,51 @@
+/*
+ * \brief Input-event source that obtains events from input connection
+ * \author Norman Feske
+ * \date 2017-02-01
+ */
+
+/*
+ * Copyright (C) 2017 Genode Labs GmbH
+ *
+ * This file is part of the Genode OS framework, which is distributed
+ * under the terms of the GNU Affero General Public License version 3.
+ */
+
+#ifndef _EVENT_FILTER__INPUT_SOURCE_H_
+#define _EVENT_FILTER__INPUT_SOURCE_H_
+
+/* local includes */
+#include
+#include
+
+namespace Event_filter { class Input_source; }
+
+
+class Event_filter::Input_source : public Source
+{
+ private:
+
+ Input_name const _input_name;
+
+ Event_root const &_event_root;
+
+ public:
+
+ static char const *name() { return "input"; }
+
+ Input_source(Owner &owner, Input_name const &input_name,
+ Event_root const &event_root)
+ :
+ Source(owner), _input_name(input_name), _event_root(event_root)
+ { }
+
+ void generate(Sink &sink) override
+ {
+ _event_root.for_each_pending_event(_input_name,
+ [&] (Input::Event const &event) {
+ sink.submit(event);
+ });
+ }
+};
+
+#endif /* _EVENT_FILTER__INPUT_SOURCE_H_ */
diff --git a/repos/os/src/server/input_filter/key_code_by_name.h b/repos/os/src/server/event_filter/key_code_by_name.h
similarity index 82%
rename from repos/os/src/server/input_filter/key_code_by_name.h
rename to repos/os/src/server/event_filter/key_code_by_name.h
index 400db90def..881f9f11a1 100644
--- a/repos/os/src/server/input_filter/key_code_by_name.h
+++ b/repos/os/src/server/event_filter/key_code_by_name.h
@@ -11,14 +11,14 @@
* under the terms of the GNU Affero General Public License version 3.
*/
-#ifndef _INPUT_FILTER__KEY_CODE_BY_NAME_H_
-#define _INPUT_FILTER__KEY_CODE_BY_NAME_H_
+#ifndef _EVENT_FILTER__KEY_CODE_BY_NAME_H_
+#define _EVENT_FILTER__KEY_CODE_BY_NAME_H_
/* Genode includes */
#include
#include
-namespace Input_filter {
+namespace Event_filter {
struct Unknown_key : Genode::Exception { };
@@ -38,4 +38,4 @@ namespace Input_filter {
}
}
-#endif /* _INPUT_FILTER__KEY_CODE_BY_NAME_H_ */
+#endif /* _EVENT_FILTER__KEY_CODE_BY_NAME_H_ */
diff --git a/repos/os/src/server/input_filter/main.cc b/repos/os/src/server/event_filter/main.cc
similarity index 65%
rename from repos/os/src/server/input_filter/main.cc
rename to repos/os/src/server/event_filter/main.cc
index 349301f791..7cb90dc98f 100644
--- a/repos/os/src/server/input_filter/main.cc
+++ b/repos/os/src/server/event_filter/main.cc
@@ -12,12 +12,10 @@
*/
/* Genode includes */
-#include
-#include
#include
-#include
#include
#include
+#include
/* local includes */
#include
@@ -26,12 +24,12 @@
#include
#include
#include
+#include
-namespace Input_filter { struct Main; }
+namespace Event_filter { struct Main; }
-struct Input_filter::Main : Input_connection::Avail_handler,
- Source::Factory, Source::Trigger
+struct Event_filter::Main : Source::Factory, Source::Trigger
{
Env &_env;
@@ -39,18 +37,16 @@ struct Input_filter::Main : Input_connection::Avail_handler,
Heap _heap { _env.ram(), _env.rm() };
- Registry > _input_connections { };
-
- typedef String Label;
+ Event_root _event_root { _env, _heap, *this, _config };
/*
* Mechanism to construct a 'Timer' on demand
*
- * By lazily constructing the timer, the input-filter does not depend
+ * By lazily constructing the timer, the event-filter does not depend
* on a timer service unless its configuration defines time-related
* filtering operations like key repeat.
*/
- struct Timer_accessor : Input_filter::Timer_accessor
+ struct Timer_accessor : Event_filter::Timer_accessor
{
struct Lazy
{
@@ -80,7 +76,7 @@ struct Input_filter::Main : Input_connection::Avail_handler,
/**
* Pool of configuration include snippets, obtained as ROM modules
*/
- struct Include_accessor : Input_filter::Include_accessor
+ struct Include_accessor : Event_filter::Include_accessor
{
struct Rom
{
@@ -225,20 +221,11 @@ struct Input_filter::Main : Input_connection::Avail_handler,
} nesting_level_guard { _create_source_max_nesting_level };
/* return input source with the matching name */
- if (node.type() == Input_source::name()) {
- Label const label = node.attribute_value("name", Label());
- Input_connection *match = nullptr;
-
- _input_connections.for_each([&] (Input_connection &connection) {
- if (connection.label() == label)
- match = &connection; });
-
- if (match)
- return *new (_heap) Input_source(owner, *match);
-
- warning("input named '", label, "' does not exist");
- throw Source::Invalid_config();
- }
+ if (node.type() == Input_source::name())
+ return *new (_heap)
+ Input_source(owner,
+ node.attribute_value("name", Input_name()),
+ _event_root);
/* create regular filter */
if (node.type() == Remap_source::name())
@@ -274,20 +261,6 @@ struct Input_filter::Main : Input_connection::Avail_handler,
*/
bool _config_update_pending = false;
- /**
- * Return true if all input sources are in their default state
- */
- bool _input_connections_idle() const
- {
- bool idle = true;
-
- _input_connections.for_each([&] (Input_connection const &connection) {
- if (!connection.idle())
- idle = false; });
-
- return idle;
- }
-
struct Output
{
Source::Owner _owner;
@@ -310,60 +283,15 @@ struct Input_filter::Main : Input_connection::Avail_handler,
Constructible
-
-
-
+
+
+
+
+
-
diff --git a/repos/ports/run/debug_nitpicker.run b/repos/ports/run/debug_nitpicker.run
index 6a4dcca64c..ee409aabe9 100644
--- a/repos/ports/run/debug_nitpicker.run
+++ b/repos/ports/run/debug_nitpicker.run
@@ -73,18 +73,20 @@ install_config {
+
-
-
+
+
+
-
-
+
+
-
+
-
+
- }
-append_if [expr $use_ps2] config_of_app {
- }
-append_if [expr $use_usb] config_of_app {
- }
-append config_of_app {
+
}
append_if [expr $use_ps2] config_of_app {
@@ -265,28 +260,30 @@ append_if [expr $use_usb] config_of_app {
}
append config_of_app {
-
-
- }
+ }
append_if [expr $use_ps2] config_of_app {
- }
+ }
append_if [expr $use_usb] config_of_app {
- }
+ }
append config_of_app {
+
+
+
-
+
+
+
-
-
-
+
+
@@ -350,7 +347,6 @@ append config_of_app {
-
diff --git a/repos/ports/run/vbox_win.inc b/repos/ports/run/vbox_win.inc
index 2a16154fdd..adb5227cb8 100644
--- a/repos/ports/run/vbox_win.inc
+++ b/repos/ports/run/vbox_win.inc
@@ -25,7 +25,7 @@ if {[info exists flavor_extension]} {
}
set build_components {
- server/input_filter
+ server/event_filter
drivers/nic
drivers/audio
server/report_rom
@@ -33,7 +33,7 @@ set build_components {
}
set boot_modules {
- input_filter
+ event_filter
ipxe_nic_drv
audio_drv
report_rom
@@ -45,16 +45,12 @@ if {$use_vbox5_nova} { set virtualbox5_binary "virtualbox5-nova" }
set config_of_app {
-
+
-
+
}
-append_if [expr $use_ps2] config_of_app {
- }
-append_if [expr $use_usb] config_of_app {
- }
append config_of_app {
}
@@ -64,14 +60,15 @@ append_if [expr $use_usb] config_of_app {
}
append config_of_app {
-
-
- }
+ }
append_if [expr $use_ps2] config_of_app {
- }
+ }
append_if [expr $use_usb] config_of_app {
- }
+ }
append config_of_app {
+
+
+
@@ -125,9 +122,10 @@ append config_of_app {
-
+
+
+
-
@@ -181,8 +179,8 @@ append config_of_app {
-
-
+
+
@@ -198,8 +196,8 @@ append config_of_app {
append_if [expr !$use_rumpfs] config_of_app {
-
-
+
+
diff --git a/repos/ports/run/vim.run b/repos/ports/run/vim.run
index eeef24f0d4..c410d31f0a 100644
--- a/repos/ports/run/vim.run
+++ b/repos/ports/run/vim.run
@@ -48,9 +48,9 @@ install_config {
+
-
@@ -65,9 +65,11 @@ install_config {
-
-
-
+
+
+
+
+
@@ -78,7 +80,6 @@ install_config {
-
diff --git a/repos/ports/run/virtualbox_auto.inc b/repos/ports/run/virtualbox_auto.inc
index 7923027004..3ffc9e05da 100644
--- a/repos/ports/run/virtualbox_auto.inc
+++ b/repos/ports/run/virtualbox_auto.inc
@@ -35,6 +35,7 @@ append build_components {
server/fs_rom
drivers/ahci
drivers/framebuffer
+ app/input_event_client
}
lappend_if [expr $use_serial] build_components server/log_terminal
@@ -212,8 +213,19 @@ append_platform_drv_config
append_if [expr $use_ps2] config {
-
+
+
+
+
+
+
+
+
+
+
+
+
}
append_if [expr $use_cpu_load] config {
@@ -347,12 +359,23 @@ append_if [expr $use_usb] config {
+
+
+
+
+
+
+
+
+
+
+
}
append_if [have_spec framebuffer] config {
-
+
}
@@ -385,6 +408,7 @@ append boot_modules {
libc.lib.so vfs.lib.so libm.lib.so
libiconv.lib.so stdcxx.lib.so
qemu-usb.lib.so
+ input_event_client
}
lappend_if [expr $use_rumpfs] boot_modules rump.lib.so
diff --git a/tool/autopilot.list b/tool/autopilot.list
index a4db8f207f..83d782dc20 100644
--- a/tool/autopilot.list
+++ b/tool/autopilot.list
@@ -14,7 +14,7 @@ fs_query
gdb_monitor
ieee754
init_smp
-input_filter
+event_filter
libc_vfs_fs_ext2
log_core
lwip