=> bc2f7406f6e573c486cd3e6b7460ff13d1b9eba1
[1mdiff --git a/src/ui/root.c b/src/ui/root.c[m [1mindex 7637d842..6f2868b7 100644[m [1m--- a/src/ui/root.c[m [1m+++ b/src/ui/root.c[m [36m@@ -2160,7 +2160,10 @@[m [miRect visibleRect_Root(const iRoot *d) {[m #endif[m #if defined (iPlatformDesktop)[m /* Apply the usable bounds of the display. */[m [31m- SDL_Rect usable; {[m [32m+[m[32m SDL_Rect usable;[m [32m+[m[32m /* TODO: Needs some investigation. With multiple monitors, at least on macOS, the bounds[m [32m+[m[32m returned here seem incorrect sometimes (infrequently). */[m [32m+[m[32m if (iFalse) {[m const float ratio = d->window->pixelRatio;[m SDL_GetDisplayUsableBounds(SDL_GetWindowDisplayIndex(d->window->win), &usable);[m iInt2 winPos;[m [1mdiff --git a/src/ui/widget.c b/src/ui/widget.c[m [1mindex addab9f0..ef2ac868 100644[m [1m--- a/src/ui/widget.c[m [1m+++ b/src/ui/widget.c[m [36m@@ -1291,19 +1291,25 @@[m [miBool scrollOverflow_Widget(iWidget *d, int delta) {[m }[m iRect bounds = boundsWithoutVisualOffset_Widget(d);[m const iRect winRect = visibleRect_Root(d->root);[m [32m+[m[32m /* TODO: This needs some fixing on mobile, probably. */[m [32m+[m[32m// const int yTop = iMaxi(0, top_Rect(winRect));[m [32m+[m[32m// const int yBottom = bottom_Rect(winRect);[m iRangei validPosRange = { bottom_Rect(winRect) - height_Rect(bounds),[m iMaxi(0, top_Rect(winRect)) };[m [31m- if (validPosRange.start > validPosRange.end) {[m [31m- validPosRange.start = validPosRange.end; /* no room to scroll */[m [31m- }[m [32m+[m[32m// if (validPosRange.end < validPosRange.start) {[m [32m+[m[32m// validPosRange.end = validPosRange.start; /* no room to scroll */[m [32m+[m[32m// }[m [32m+[m[32m// if ((!isTopOver && delta < 0) || (!isBottomOver && delta > 0)) {[m [32m+[m[32m// delta = 0;[m [32m+[m[32m// }[m if (delta) {[m [31m- if (delta < 0 && bounds.pos.y < validPosRange.start) {[m [31m- delta = 0;[m [31m- }[m [31m- if (delta > 0 && bounds.pos.y > validPosRange.end) {[m [31m- delta = 0;[m [31m- }[m [31m- //printf("delta:%d validPosRange:%d...%d\n", delta, validPosRange.start, validPosRange.end); fflush(stdout);[m [32m+[m[32m// if (delta < 0 && bounds.pos.y < validPosRange.start) {[m [32m+[m[32m// delta = 0;[m [32m+[m[32m// }[m [32m+[m[32m// if (delta > 0 && bounds.pos.y > validPosRange.end) {[m [32m+[m[32m// delta = 0;[m [32m+[m[32m// }[m [32m+[m[32m// printf("delta:%d validPosRange:%d...%d\n", delta, validPosRange.start, validPosRange.end); fflush(stdout);[m bounds.pos.y += delta;[m if (delta < 0) {[m bounds.pos.y = iMax(bounds.pos.y, validPosRange.start);[m [36m@@ -1316,7 +1322,10 @@[m [miBool scrollOverflow_Widget(iWidget *d, int delta) {[m }[m }[m else {[m [31m- bounds.pos.y = iClamp(bounds.pos.y, validPosRange.start, validPosRange.end);[m [32m+[m[32m /* TODO: This is used on mobile. */[m [32m+[m[41m [m [32m+[m[32m// printf("clamping validPosRange:%d...%d\n", validPosRange.start, validPosRange.end); fflush(stdout);[m [32m+[m[32m// bounds.pos.y = iClamp(bounds.pos.y, validPosRange.start, validPosRange.end);[m }[m const iInt2 newPos = windowToInner_Widget(d->parent, bounds.pos);[m if (!isEqual_I2(newPos, d->rect.pos)) {[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).