summaryrefslogtreecommitdiff
path: root/src/ui/widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r--src/ui/widget.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index 590dbe70..e4d92b35 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -225,6 +225,13 @@ void setCommandHandler_Widget(iWidget *d, iBool (*handler)(iWidget *, const char
225 d->commandHandler = handler; 225 d->commandHandler = handler;
226} 226}
227 227
228void setRoot_Widget(iWidget *d, iRoot *root) {
229 d->root = root;
230 iForEach(ObjectList, i, d->children) {
231 setRoot_Widget(i.object, root);
232 }
233}
234
228static int numExpandingChildren_Widget_(const iWidget *d) { 235static int numExpandingChildren_Widget_(const iWidget *d) {
229 int count = 0; 236 int count = 0;
230 iConstForEach(ObjectList, i, d->children) { 237 iConstForEach(ObjectList, i, d->children) {
@@ -749,7 +756,8 @@ iLocalDef iBool isMouseEvent_(const SDL_Event *ev) {
749static iBool filterEvent_Widget_(const iWidget *d, const SDL_Event *ev) { 756static iBool filterEvent_Widget_(const iWidget *d, const SDL_Event *ev) {
750 const iBool isKey = isKeyboardEvent_(ev); 757 const iBool isKey = isKeyboardEvent_(ev);
751 const iBool isMouse = isMouseEvent_(ev); 758 const iBool isMouse = isMouseEvent_(ev);
752 if (d->flags & disabled_WidgetFlag) { 759 if ((d->flags & disabled_WidgetFlag) || (d->flags & hidden_WidgetFlag &&
760 d->flags & disabledWhenHidden_WidgetFlag)) {
753 if (isKey || isMouse) return iFalse; 761 if (isKey || isMouse) return iFalse;
754 } 762 }
755 if (d->flags & hidden_WidgetFlag) { 763 if (d->flags & hidden_WidgetFlag) {