]> rtime.felk.cvut.cz Git - l4.git/commitdiff
update
authorl4check <l4check@d050ee49-bd90-4346-b210-929a50b99cfc>
Mon, 15 Nov 2010 16:38:23 +0000 (16:38 +0000)
committerl4check <l4check@d050ee49-bd90-4346-b210-929a50b99cfc>
Mon, 15 Nov 2010 16:38:23 +0000 (16:38 +0000)
git-svn-id: http://svn.tudos.org/repos/oc/tudos/trunk@27 d050ee49-bd90-4346-b210-929a50b99cfc

24 files changed:
kernel/fiasco/src/abi/l4_buf_desc.cpp
kernel/fiasco/src/kern/config.cpp
kernel/fiasco/src/kern/ia32/timer-apic.cpp
kernel/fiasco/src/kern/thread-ipc.cpp
kernel/fiasco/tool/backtrace
l4/conf/Makeconf.boot.example
l4/conf/examples/arm-rv.io [new file with mode: 0644]
l4/conf/examples/l4lx-gfx.cfg [new file with mode: 0644]
l4/conf/examples/l4lx-x86.io [new file with mode: 0644]
l4/conf/examples/l4lx.cfg [new file with mode: 0644]
l4/conf/modules.list
l4/mk/export_defs.inc
l4/pkg/fb-drv/server/src/fb.h
l4/pkg/fb-drv/server/src/main.cc
l4/pkg/l4re/util/include/video/goos_fb
l4/pkg/libsdl/lib/src/src/video/l4fb/SDL_l4fbvideowork.c
l4/pkg/mag/include/server/input_driver
l4/pkg/mag/include/server/plugin
l4/pkg/mag/include/server/user_state
l4/pkg/mag/include/server/view_stack
l4/pkg/mag/plugins/input_libinput/input_libinput.cc
l4/pkg/mag/plugins/input_lxdd/input_lxdd.cc
l4/pkg/mag/server/src/main.cc
l4/pkg/mag/server/src/view_stack.cc

index 9f38ccb257fb56ee02585e6fa89de62e5a8cbc24..e90c8a9076cedab75880468e5cc3a7a6d2cc37bc 100644 (file)
@@ -12,15 +12,14 @@ public:
 
   L4_buf_desc() {}
 
-  L4_buf_desc(unsigned mem, unsigned io, unsigned obj, unsigned str,
+  L4_buf_desc(unsigned mem, unsigned io, unsigned obj,
               unsigned flags = 0)
-  : _raw(mem | (io << 5) | (obj << 10) | (str << 15) | flags)
+  : _raw(mem | (io << 5) | (obj << 10) | flags)
   {}
 
   unsigned mem() const { return _raw & ((1UL << 5)-1); }
   unsigned io()  const { return (_raw >> 5) & ((1UL << 5)-1); }
   unsigned obj() const { return (_raw >> 10) & ((1UL << 5)-1); }
-  unsigned str() const { return (_raw >> 15) & ((1UL << 5)-1); }
   Mword flags() const { return _raw; }
 
   Mword raw() const { return _raw; }
index f1e2d8ef67d2b03b25aa00a6fdd364e7e6bd70f0..c3f49d3c7783ebed054872a99aac22dbb2327878 100644 (file)
@@ -86,6 +86,10 @@ public:
 
   enum {
     Kip_syscalls = 1,
+
+    One_shot_min_interval_us =   200,
+    One_shot_max_interval_us = 10000,
+
 #ifdef CONFIG_ASSEMBLER_IPC_SHORTCUT
     Assembler_ipc_shortcut = 1,
 #else
index 8dddbd6f257c465431c46a7e9a2ace919bb4f84e..c9c60646d9ad4e58674fa4536e9fa6e80b092161 100644 (file)
@@ -73,10 +73,10 @@ Timer::update_one_shot(Unsigned64 wakeup)
   else
     {
       Unsigned64 delta = wakeup - now;
-      if (delta < 1000)
-       apic = Apic::us_to_apic(1000);
-      else if (delta > 10000)
-       apic = Apic::us_to_apic(10000);
+      if (delta < Config::One_shot_min_interval_us)
+       apic = Apic::us_to_apic(Config::One_shot_min_interval_us);
+      else if (delta > Config::One_shot_max_interval_us)
+       apic = Apic::us_to_apic(Config::One_shot_max_interval_us);
       else
         apic = Apic::us_to_apic(delta);
 
index 9f4d102ccf6b60dbd2143d59ed7054fc7f3a610a..73bc5475c2411f157d7efc40af1f4f733778505b 100644 (file)
@@ -256,7 +256,7 @@ Thread::handle_page_fault_pager(Thread_ptr const &_pager,
   Pf_msg_utcb_saver saved_utcb_fields(utcb);
 
 
-  utcb->buf_desc = L4_buf_desc(0,0,0,0,L4_buf_desc::Inherit_fpu);
+  utcb->buf_desc = L4_buf_desc(0, 0, 0, L4_buf_desc::Inherit_fpu);
   utcb->buffers[0] = L4_msg_item::map(0).raw();
   utcb->buffers[1] = L4_fpage::all_spaces().raw();
 
@@ -873,7 +873,7 @@ Thread::exception(Kobject_iface *handler, Trap_state *ts, Mword rights)
   Utcb *utcb = access_utcb();
   Buf_utcb_saver saved_state(utcb);
 
-  utcb->buf_desc = L4_buf_desc(0,0,0,0,L4_buf_desc::Inherit_fpu);
+  utcb->buf_desc = L4_buf_desc(0, 0, 0, L4_buf_desc::Inherit_fpu);
   utcb->buffers[0] = L4_msg_item::map(0).raw();
   utcb->buffers[1] = L4_fpage::all_spaces().raw();
 
index c891f51939788f581896c9d36043bf0a4f5a45bb..ffa72817d448e871f49f45933bc8570ebdadf35d 100755 (executable)
@@ -26,6 +26,7 @@ if (!defined $img)
 }
 
 my $nm = 'nm';
+$nm = "$ENV{'SYSTEM_TARGET'}$nm" if defined $ENV{"SYSTEM_TARGET"};
 $nm = 'arm-softfloat-elf-nm' if !(system("file -L $img | grep -qw ARM") >> 8);
 
 foreach my $l (split('\n', qx{$nm $img | c++filt}))
index c818488f25db66f0bc03e3b8ae8ecbecae1f6784..fa27b51db9715b82bf24455bf65bd17e5e6a865a 100644 (file)
 qemu: MODULE_SEARCH_PATH += /path/to/fiasco-build
 
 # Optional options for QEMU, but setting '-serial stdio' is recommended
-#QEMU_OPTIONS      = -serial stdio -nographic ...
-#QEMU_OPTIONS-arm += -M realview-eb 256
-#QEMU_OPTIONS      = $(QEMU_OPTIONS-$(ARCH))
+QEMU_OPTIONS       = -serial stdio
+#QEMU_OPTIONS      = -nographic
+#QEMU_OPTIONS-arm += -M realview-eb -m 256
+QEMU_OPTIONS      += $(QEMU_OPTIONS-$(ARCH))
 
 # The path to the QEMU binary - optional
 #QEMU_PATH-x86   = /path/to/qemu
diff --git a/l4/conf/examples/arm-rv.io b/l4/conf/examples/arm-rv.io
new file mode 100644 (file)
index 0000000..7e48015
--- /dev/null
@@ -0,0 +1,14 @@
+hw-root
+{
+  NIC => new Device()
+  {
+    .hid = "smsc911x";
+    new-res Mmio(0x4e000000 .. 0x4e000fff);
+    new-res Irq(60);
+  }
+}
+
+l4lx => new System_bus()
+{
+  NIC => wrap(hw-root.NIC);
+} 
diff --git a/l4/conf/examples/l4lx-gfx.cfg b/l4/conf/examples/l4lx-gfx.cfg
new file mode 100644 (file)
index 0000000..8b6c580
--- /dev/null
@@ -0,0 +1,60 @@
+-- vim:set ft=lua:
+
+loader = L4.default_loader;
+
+local lxname = "vmlinuz";
+if L4.Info.arch() == "arm" then
+  lxname = "vmlinuz.arm";
+end
+
+-- Start io
+
+vbus_l4linux = loader:new_channel();
+vbus_input   = loader:new_channel();
+vbus_fbdrv   = loader:new_channel();
+
+loader:start(
+  {
+    caps = {
+      sigma0  = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0);
+      icu     = L4.Env.icu;
+      input   = vbus_input:svr();
+      l4linux = vbus_l4linux:svr();
+      fbdrv   = vbus_fbdrv:svr();
+    },
+  }, "rom/io rom/x86-legacy.devs rom/l4lx-x86.io");
+
+-- Start fb-drv (but only if we need to)
+local fb = L4.Env.vesa;
+if (not fb) then
+  fb = loader:new_channel();
+  loader:start({ caps = { fb = fb:svr(), vbus = vbus_fbdrv }},
+               "rom/fb-drv -m 0x117");
+end
+
+local mag_mag = loader:new_channel();
+local mag_svc = loader:new_channel();
+
+-- Start mag
+loader:start(
+  {
+    caps = {
+      vbus = vbus_input;
+      mag  = mag_mag:svr();
+      svc  = mag_svc:svr();
+      fb   = fb;
+    },
+  }, "rom/mag");
+
+
+-- Start Linux
+loader:start(
+  { caps = {
+      log = L4.Env.log:m("rws"),
+      fb  = mag_svc:create(L4.Proto.Goos, "640x480");
+      vbus = vbus_l4linux;
+    },
+    l4re_dbg = L4.Dbg.Warn,
+    log = { "l4linux", "yellow" },
+  },
+  "rom/" .. lxname .. " mem=64M console=tty0 l4x_rd=rom/ramdisk-" ..  L4.Info.arch() .. ".rd root=1:0 ramdisk_size=4000 init=/bin/sh");
diff --git a/l4/conf/examples/l4lx-x86.io b/l4/conf/examples/l4lx-x86.io
new file mode 100644 (file)
index 0000000..f174079
--- /dev/null
@@ -0,0 +1,27 @@
+input => new System_bus()
+{
+  ps2dev => wrap(hw-root.match("PNP0303"));
+}
+
+fbdrv => new System_bus()
+{
+  PCI0 => new PCI_bus_ident()
+  {
+    host_bridge_dummy => new PCI_dummy_device();
+  
+    pci_gfx[] => wrap(hw-root.match("PCI/CC_03"));
+  }
+    
+  x1 => wrap(hw-root.match("BIOS"));
+  x2 => wrap(hw-root.match("PNP0900"));
+  x3 => wrap(hw-root.match("PNP0100"));
+} 
+
+l4linux => new System_bus()
+{
+  # Add a new virtual PCI root bridge
+  PCI0 => new PCI_bus()
+  {
+    pci_l4x[] => wrap(hw-root.match("PCI/CC_02,PCI/CC_01,PCI/CC_04"));
+  }
+}
diff --git a/l4/conf/examples/l4lx.cfg b/l4/conf/examples/l4lx.cfg
new file mode 100644 (file)
index 0000000..ca61e77
--- /dev/null
@@ -0,0 +1,15 @@
+-- vim:set ft=lua:
+
+local lxname = "vmlinuz";
+if L4.Info.arch() == "arm" then
+  lxname = "vmlinuz.arm";
+end
+
+L4.default_loader:start(
+  { caps = {
+      log = L4.Env.log:m("rws"),
+    },
+    l4re_dbg = L4.Dbg.Warn,
+    log = { "l4linux", "yellow" },
+  },
+  "rom/" .. lxname .. " mem=64M console=ttyLv0 l4x_rd=rom/ramdisk-" ..  L4.Info.arch() .. ".rd root=1:0 ramdisk_size=4000 init=/bin/sh");
index 748d57aa669282557bd88f98f25593b348a44839..62147dcd52dd77be1457e10b29a48a7313cd11c8 100644 (file)
@@ -51,3 +51,26 @@ module libc_be_l4re.so
 module r/libsupc++.so
 module r/libuc_c.so
 
+entry L4linux ARM
+roottask moe rom/l4lx.cfg
+module l4re
+module ned
+module l4lx.cfg
+module io
+module arm-rv.io
+module vmlinuz.arm
+module ramdisk-arm.rd
+
+entry L4Linux-mag-x86
+roottask moe rom/l4lx-gfx.cfg
+module l4re
+module ned
+module l4lx-gfx.cfg
+module io
+module fb-drv
+module mag
+module x86-legacy.devs
+module l4lx-x86.io
+module vmlinuz
+module ramdisk-x86.rd
+
index 985651a738eeec18bff96858de392f9a79799da7..6e5d208f3445595d1b279efa3bd26e8740020ee9 100644 (file)
@@ -21,6 +21,8 @@ MODE = static
 ifneq ($(SYSTEM),)
 
 L4_SYSTEM                    = $(ARCH)_$(CPU)
+L4_CC                        = $(CC)
+L4_CXX                       = $(CXX)
 L4_CRT0_STATIC               = $(CRT0)
 L4_CRTN_STATIC               = $(CRTN)
 L4_LDFLAGS_LD                = $(filter-out -l%,$(BID_LDFLAGS_FOR_LINKING_LD))
@@ -66,6 +68,8 @@ all::
        @echo ""                                                               >> $(L4DEF_FILE_SH)
        @:
        @$(call do_output_all,L4_SYSTEM)
+       @$(call do_output_all,L4_CC)
+       @$(call do_output_all,L4_CXX)
        @$(call do_output_all,L4_CRT0_STATIC)
        @$(call do_output_all,L4_CRTN_STATIC)
        @$(call do_output_all,L4_LDFLAGS_LD)
index 6ce3ac932e3b41f2bc5462c4ac8f2efc610f791d..980d3554c5b4b8e2d50478b00eaf21c7a1c280c1 100644 (file)
@@ -10,7 +10,6 @@
 #pragma once
 
 #include <l4/re/util/video/goos_svr>
-#include <l4/re/util/cap_alloc>
 #include <l4/re/util/object_registry>
 #include <l4/re/util/dataspace_svr>
 
index 12cce7931b1fc80f802a59b4b16d73529b75118e..9b9cae7cdf16ef7b997196dc18fb3a9ddca91b2b 100644 (file)
@@ -8,12 +8,11 @@
  * GNU General Public License 2.
  * Please see the COPYING-GPL-2 file for details.
  */
-#include <l4/re/env>
-#include <l4/re/error_helper>
-#include <l4/re/namespace>
-#include <l4/re/util/cap_alloc>
+
+#include <l4/sys/capability>
+#include <l4/sys/typeinfo_svr>
 #include <l4/cxx/ipc_server>
-#include <l4/cxx/l4iostream>
+
 #include <cstdio>
 #include <getopt.h>
 #include <cstdlib>
@@ -74,6 +73,8 @@ Phys_fb::dispatch(l4_umword_t obj, L4::Ipc_iostream &ios)
   ios >> tag;
   switch (tag.label())
     {
+    case L4::Meta::Protocol:
+      return L4::Util::handle_meta_request<L4Re::Video::Goos>(ios);
     case L4Re::Protocol::Goos:
       return L4Re::Util::Video::Goos_svr::dispatch(obj, ios);
     case L4Re::Protocol::Dataspace:
@@ -114,7 +115,7 @@ Prog_args::Prog_args(int argc, char *argv[])
         default:
           printf("Unknown option '%c'\n", c);
           break;
-        };
+        }
     }
 }
 
@@ -152,7 +153,7 @@ int main(int argc, char *argv[])
 
   if (!fb->obj_cap().is_valid())
     {
-      printf("Failed to register in namespace, maybe ro?\n");
+      printf("Failed to connect.\n");
       return 1;
     }
 
index 4d7fbd8b6958a8b77622d68517f1f0b1ae8d130c..beed5a5d0a8baf07a23f6f2d180a7df7d042046e 100644 (file)
@@ -60,6 +60,9 @@ public:
   int view_info(L4Re::Video::View::Info *info)
   { return _view.info(info); }
 
+  L4Re::Video::View const *view() const { return &_view; }
+  L4Re::Video::View *view() { return &_view; }
+
   L4::Cap<L4Re::Dataspace> buffer() const { return _buffer; }
   void *attach_buffer();
 
index f5210ae3bc4a2744e7cb23eab196422ee9e62b20..6cc0c550e66c8d3e22ca6a0fe55cc6373bcc65d6 100644 (file)
@@ -79,8 +79,8 @@ SDL_Surface *L4FB_SetVideoMode(_THIS, SDL_Surface *current, int width, int heigh
        /* Set up the new mode framebuffer */
        current->w = width;
        current->h = height;
-       current->pitch = current->w * (bpp / 8);
-       this->hidden->pitch =  current->w * (bpp / 8);
+       current->pitch = SDL_CalculatePitch(current);
+       this->hidden->pitch =  current->pitch;
        current->flags =  SDL_PREALLOC | SDL_ASYNCBLIT;
 
 
index 31bccaef2c2e1fd24b15a6819dd8aac91dceff87..4edd48144f9e21a3818d153d42d78d157453213b 100644 (file)
@@ -147,32 +147,12 @@ public:
 
 class Input_driver : public Plugin
 {
-protected:
-  Core_api *_core;
-
-private:
-  Input_driver *_next_active;
-
 public:
   explicit Input_driver(char const *name)
-  : Plugin(name), _core(0), _next_active(0)
+  : Plugin(name)
   {}
 
   char const *type() const { return "input-driver"; }
-  Input_driver *next_active() const { return _next_active; }
-  virtual void poll_events() = 0;
-  virtual int probe() = 0;
-
-  void start(Core_api *core)
-  {
-    _core = core;
-    if (probe() == 0)
-      {
-       _next_active = core->input_drivers();
-       core->add_input_driver(this);
-      }
-  }
-
   virtual ~Input_driver() {}
 };
 
index 448dc860e296d053f771f521af1fad260dabbb10..6e502a449b78ff5cd89b7b99d8331513ddb257ce 100644 (file)
 #pragma once
 
 #include <l4/mag/server/object>
+#include <l4/re/video/goos>
 
 namespace Mag_server {
 
 class User_state;
-class Input_driver;
+class Core_api;
+
+class Input_source
+{
+private:
+  friend class Core_api;
+  Input_source *_next_active;
+
+protected:
+  Core_api *_core;
+
+public:
+  explicit Input_source(Core_api *core = 0) : _core(core) {}
+  virtual void poll_events() = 0;
+  Input_source *next() const { return _next_active; }
+};
 
 class Core_api
 {
 private:
-  Input_driver *_input;
+  Input_source *_input;
   Registry *_reg;
   User_state *_ust;
   L4::Cap<void> _rcv_cap;
+  L4::Cap<L4Re::Video::Goos> _fb;
 
   // not instanziatable
   Core_api(Core_api const &);
   void operator = (Core_api const &);
 
 public:
-  Core_api(Registry *r, User_state *u, L4::Cap<void> rcvc)
-  : _reg(r), _ust(u), _rcv_cap(rcvc)
+  Core_api(Registry *r, User_state *u, L4::Cap<void> rcvc,
+           L4::Cap<L4Re::Video::Goos> fb)
+  : _reg(r), _ust(u), _rcv_cap(rcvc), _fb(fb)
   {}
 
   Registry *registry() const { return _reg; }
   User_state *user_state() const { return _ust; }
-  Input_driver *input_drivers() const { return _input; }
-  void add_input_driver(Input_driver *i) { _input = i; }
+  Input_source *input_sources() const { return _input; }
+  L4::Cap<L4Re::Video::Goos> backend_fb() const { return _fb; }
+  void add_input_source(Input_source *i)
+  {
+    i->_next_active = _input;
+    _input = i;
+  }
+
   L4::Cap<void> rcv_cap() const { return _rcv_cap; }
 };
 
index 08410b72d4d56ac29fbc5003a158202cfd4c9c5b..6dd3105c0159b104985558ae3d31051374ec9792 100644 (file)
@@ -12,6 +12,7 @@
 #include <l4/mag-gfx/geometry>
 #include <l4/mag/server/view_stack>
 
+#include <l4/re/video/view>
 #include <l4/re/event>
 
 namespace Mag_server {
@@ -30,8 +31,9 @@ private:
   int _pressed_keys;
 
 public:
-  User_state(Canvas *screen, View *cursor, View *bg)
-  : _vstack(screen, bg), _mouse_pos(0,0),
+  User_state(Canvas *screen, L4Re::Video::View *screen_view,
+             View *cursor, View *bg)
+  : _vstack(screen, screen_view, bg), _mouse_pos(0,0),
     _mouse_cursor(cursor), _pointed_view(0), _next_mouse_pos(0,0),
     _pressed_keys(0)
   {
index cc3ff26b0c7cdfdfd1829e437d07b0e4ce13467f..42ce3e470291cee7f12f0bb6a9ba92b21857663a 100644 (file)
@@ -9,8 +9,11 @@
  */
 #pragma once
 
+#include <l4/re/video/view>
+
 #include <l4/mag-gfx/canvas>
 #include <l4/mag/server/view>
+
 #include <assert.h>
 
 namespace Mag_server {
@@ -35,6 +38,8 @@ private:
   Mode _mode;
   View *_focused;
 
+  L4Re::Video::View *_canvas_view;
+
 
   Dummy_view _no_stay_top_v;
 
@@ -64,9 +69,9 @@ private:
   }
 
 public:
-  explicit View_stack(Canvas *canvas, View *bg)
+  explicit View_stack(Canvas *canvas, L4Re::Video::View *canvas_view, View *bg)
   : _canvas(canvas), _no_stay_top(&_no_stay_top_v),  _top(bg),
-    _background(bg), _focused(bg)
+    _background(bg), _focused(bg), _canvas_view(canvas_view)
   {
     bg->_pn = &_top;
     insert_before(_no_stay_top, _top);
index 0d297c33dd66bca1f23c230ae9dfd2f27d73c374..f7b142e964382da5a8886adb3f2246e9e5ff2244 100644 (file)
@@ -13,6 +13,8 @@
 
 namespace {
 using Mag_server::Input_driver;
+using Mag_server::Input_source;
+using Mag_server::Core_api;
 using Mag_server::User_state;
 using Mag_server::Motion_fwd;
 
@@ -24,16 +26,17 @@ struct Emit
   { u->handle_event(e); }
 };
 
-class Input_driver_libinput : public Input_driver
+class Input_driver_libinput : public Input_driver, public Input_source
 {
 public:
   Input_driver_libinput() : Input_driver("libinput") {}
-  int probe()
+  void start(Core_api *core)
   {
     if (l4input_init(0xff, 0) == 0)
-      return 0;
-
-    return 1;
+      {
+       _core = core;
+       core->add_input_source(this);
+      }
   }
 
   void poll_events()
index 39bf8a5b6d6cc02dd6776490e6728db9aef18a92..a08b6ee655457f53f1215e79536a43f4d78f02e0 100644 (file)
@@ -53,7 +53,7 @@ struct Emit
   { u->handle_event(e); }
 };
 
-class Input_driver_lxproxy : public Input_driver
+class Input_driver_lxproxy : public Input_driver, public Input_source
 {
 private:
   Auto_cap<L4Re::Dataspace>::Cap _ev_ds;
@@ -65,7 +65,7 @@ private:
 public:
 
   Input_driver_lxproxy() : Input_driver("L4Linux Proxy") {}
-  int probe()
+  void start(Core_api *core)
   {
     try
       {
@@ -81,14 +81,14 @@ public:
              _ev_ds.get(), 0, L4_PAGESHIFT));
 
        _ev = L4Re::Event_buffer(_ev_ds_m.get(), _ev_ds->size());
+       _core = core;
+       core->add_input_source(this);
        printf("LXDD: buffer @%p\n", _ev_ds_m.get());
-       return 0;
       }
     catch (...)
       {
        printf("could not find linux proxy input\n");
       }
-    return 1;
   }
 
   void poll_events()
index 6dcd837be35eebf71eab192a9ffa43ba7f0f4c05..0c53b1010fd9cfbd5db1e054b288cf893bd0287f 100644 (file)
@@ -101,7 +101,7 @@ public:
 static void
 poll_input(Core_api *core)
 {
-  for (Input_driver *i = core->input_drivers(); i; i = i->next_active())
+  for (Input_source *i = core->input_sources(); i; i = i->next())
       i->poll_events();
 }
 
@@ -241,8 +241,17 @@ int run(int argc, char const *argv[])
   View *cursor = f->create_cursor(big_mouse);
   Background bg(screen->size());
 
-  static User_state user_state(screen, cursor, &bg);
-  static Core_api core_api(&registry, &user_state, rcv_cap);
+  L4Re::Video::View *screen_view = 0;
+
+    {
+      L4Re::Video::Goos::Info i;
+      goos_fb.goos()->info(&i);
+      if (!i.auto_refresh())
+       screen_view = goos_fb.view();
+    }
+  
+  static User_state user_state(screen, screen_view, cursor, &bg);
+  static Core_api core_api(&registry, &user_state, rcv_cap, fb);
 
   Plugin_manager::start_plugins(&core_api);
 
@@ -263,15 +272,18 @@ int main(int argc, char const *argv[])
     {
       return run(argc, argv);
     }
+  catch (L4::Runtime_error const &e)
+    {
+      L4::cerr << "Error: " << e << '\n';
+    }
   catch (L4::Base_exception const &e)
     {
       L4::cerr << "Error: " << e << '\n';
-      return -1;
     }
   catch (std::exception const &e)
     {
       L4::cerr << "Error: " << e.what() << '\n';
     }
 
-  return 0;
+  return -1;
 }
index bbf9e5feed8e24e1009f3f7ccbc56266c84212eb..d2837a110d06cc9c544f48043abf39986ee3054f 100644 (file)
@@ -164,9 +164,6 @@ View_stack::draw_recursive(View const *v, View const *dst, Rect const &rect) con
     draw_recursive(n, dst, border.b);
 }
 
-void flush();
-
-
 void
 View_stack::refresh_view(View const *v, View const *dst, Rect const &rect) const
 {
@@ -183,7 +180,11 @@ void
 View_stack::flush()
 {
   for (Redraw_queue::iterator i = rdq.begin(); i != rdq.end(); ++i)
-    draw_recursive(top(), 0, *i);
+    {
+      draw_recursive(top(), 0, *i);
+      if (_canvas_view)
+       _canvas_view->refresh(i->x1(), i->y1(), i->w(), i->h());
+    }
 
   rdq.clear();
 }