if (w <= 0 || h <= 0 || h >= 10000 || w >= 10000)
return -L4_ERANGE;
+ int px = 50, py = 50;
+
+ if (char *a = strstr(_msg, "pos="))
+ {
+ char *endp;
+ px = strtol(a + 4, &endp, 0);
+ if (*endp == ',')
+ py = strtol(endp + 1, 0, 0);
+ }
+
+ if (px < 10 - w)
+ px = 10 - w;
+ if (px >= ust()->vstack()->canvas()->size().w())
+ px = ust()->vstack()->canvas()->size().w() - 10;
+ if (py < 0)
+ py = 0;
+ if (py >= ust()->vstack()->canvas()->size().h())
+ py = ust()->vstack()->canvas()->size().h() - 10;
+
Area res(w, h);
Auto_cap<L4Re::Dataspace>::Cap ds(
L4Re::Util::cap_alloc.alloc<L4Re::Dataspace>());
Texture *smpl = sf->create_texture(res, dsa.get());
- cxx::Ref_ptr<Client_fb> x(new Client_fb(_core, Rect(Point(50, 50), Area(res.w(), res.h() + 16)), Point(0, 0), smpl, ds.get()));
+ cxx::Ref_ptr<Client_fb> x(new Client_fb(_core, Rect(Point(px, py), Area(res.w(), res.h() + 16)), Point(0, 0), smpl, ds.get()));
reg()->register_obj(x);
x->obj_cap()->dec_refcnt(1);