From 3e2e2ee2fead23dc5ae10a4f99dbb18d80753bcd Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 2 Jan 2017 14:25:51 +0100 Subject: [PATCH] app/pointer: API transition Ref #1987 --- repos/os/src/app/pointer/main.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/repos/os/src/app/pointer/main.cc b/repos/os/src/app/pointer/main.cc index 8ec8d30d0a..6753947d27 100644 --- a/repos/os/src/app/pointer/main.cc +++ b/repos/os/src/app/pointer/main.cc @@ -15,8 +15,8 @@ #include #include #include -#include -#include +#include +#include /* local includes */ #include "big_mouse.h" @@ -42,9 +42,9 @@ void convert_cursor_data_to_pixels(PT *pixel, Nitpicker::Area size) } -int main(int, char **) +void Component::construct(Genode::Env &env) { - static Nitpicker::Connection nitpicker; + static Nitpicker::Connection nitpicker { env, "cursor" }; Nitpicker::Area const cursor_size(big_mouse.w, big_mouse.h); @@ -52,15 +52,15 @@ int main(int, char **) Framebuffer::Mode::RGB565); nitpicker.buffer(mode, true); - static Genode::Attached_dataspace ds(nitpicker.framebuffer()->dataspace()); + Genode::Attached_dataspace ds( + env.rm(), nitpicker.framebuffer()->dataspace()); - convert_cursor_data_to_pixels(ds.local_addr(), cursor_size); + convert_cursor_data_to_pixels( + ds.local_addr(), cursor_size); Nitpicker::Session::View_handle view = nitpicker.create_view(); Nitpicker::Rect geometry(Nitpicker::Point(0, 0), cursor_size); nitpicker.enqueue(view, geometry); nitpicker.enqueue(view); nitpicker.execute(); - - Genode::sleep_forever(); }