+ if(!v)
+ {
+ if(widget==container.click_focus)
+ container.click_focus = 0;
+ if(widget==container.pointer_focus)
+ container.set_pointer_focus(0);
+ if(widget==container.input_focus)
+ container.set_input_focus(0);
+ }
+}
+
+void Container::Child::request_focus()
+{
+ container.set_input_focus(widget);
+ if(container.parent && container.visible)
+ container.set_focus();
+}
+
+void Container::Child::grab_pointer()
+{
+ if(!container.pointer_grabbed)
+ {
+ container.set_pointer_focus(widget);
+ container.pointer_grabbed = true;
+ container.signal_grab_pointer.emit();
+ }
+}
+
+void Container::Child::ungrab_pointer()
+{
+ if(container.pointer_grabbed && container.pointer_focus==widget)
+ {
+ // XXX Should set to the widget under pointer
+ container.set_pointer_focus(0);
+ container.pointer_grabbed = false;
+ container.signal_ungrab_pointer.emit();
+ }