summaryrefslogtreecommitdiff
path: root/src/ui/widget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-19 13:15:08 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-19 13:15:08 +0200
commit7a0980fd58308f7333254a1276e6dd5072326d98 (patch)
tree8431dfd498762a90944bb5e595f61ea2af914a81 /src/ui/widget.c
parent63dc07ddbecfdf0be7c0bd98c53e492628dda98b (diff)
iOS: Adjusting the UI for a tablet screen
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r--src/ui/widget.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index 5afb004f..331192f9 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -734,9 +734,19 @@ iAny *hitChild_Widget(const iWidget *d, iInt2 coord) {
734 if (d->flags & unhittable_WidgetFlag) { 734 if (d->flags & unhittable_WidgetFlag) {
735 return NULL; 735 return NULL;
736 } 736 }
737 iConstForEach(ObjectList, i, d->children) { 737 /* Check for on-top widgets first. */
738 iAny *found = hitChild_Widget(constAs_Widget(i.object), coord); 738 if (!d->parent) {
739 if (found) return found; 739 iForEach(PtrArray, i, onTop_RootData_()) {
740 iAny *found = hitChild_Widget(constAs_Widget(i.ptr), coord);
741 if (found) return found;
742 }
743 }
744 iForEach(ObjectList, i, d->children) {
745 const iWidget *child = constAs_Widget(i.object);
746 if (~child->flags & keepOnTop_WidgetFlag) {
747 iAny *found = hitChild_Widget(child, coord);
748 if (found) return found;
749 }
740 } 750 }
741 if (contains_Widget(d, coord)) { 751 if (contains_Widget(d, coord)) {
742 return iConstCast(iWidget *, d); 752 return iConstCast(iWidget *, d);