2 * (c) 2010 Alexander Warg <warg@os.inf.tu-dresden.de>
3 * economic rights: Technische Universität Dresden (Germany)
5 * This file is part of TUD:OS and distributed under the terms of the
6 * GNU General Public License 2.
7 * Please see the COPYING-GPL-2 file for details.
9 #include <l4/scout-gfx/basic_window>
14 Basic_window::_assign_mfocus(Widget *e, int force)
16 /* return if mouse focus did not change */
17 if (!force && e == _mfocus)
20 /* tell old mouse focus to release focus */
24 /* assign new current mouse focus */
27 /* notify new mouse focus */
32 /* determine new current link destination */
33 Widget *old_dst = _dst;
35 if (_mfocus && (lt = dynamic_cast<Link_token*>(_mfocus)))
41 /* nofify element tree about new link destination */
43 _root->curr_link_destination(_dst);
48 Basic_window::handle_event(Event const &ev)
50 Parent_widget::handle_event(ev);
55 _active->handle_event(re);
69 if (ev.key_cnt != 1 || !e)
73 _active_pos = e->map_to_parent(Point(0,0));
78 _active->handle_event(re);
95 if (Widget *x = find_child(m))
98 re.m = x->map_from_parent(ev.m);
107 re.m = e->map_from_parent(ev.m);