=> 53df4b8f9b5d7cadf0874dbed99042f567afb66a
[1mdiff --git a/src/app.c b/src/app.c[m [1mindex 1b071249..cf7619dc 100644[m [1m--- a/src/app.c[m [1m+++ b/src/app.c[m [36m@@ -1591,7 +1591,7 @@[m [mvoid processEvents_App(enum iAppEventMode eventMode) {[m setCurrent_Window(window);[m window->lastHover = window->hover;[m wasUsed = processEvent_Window(window, &ev);[m [31m- if (ev.type == SDL_MOUSEMOTION || ev.type == SDL_MOUSEBUTTONDOWN) {[m [32m+[m[32m if (ev.type == SDL_MOUSEMOTION) {[m /* Only offered to the frontmost window. */[m break;[m }[m [1mdiff --git a/src/ui/root.c b/src/ui/root.c[m [1mindex 0967184c..1d1d2e61 100644[m [1m--- a/src/ui/root.c[m [1m+++ b/src/ui/root.c[m [36m@@ -319,6 +319,11 @@[m [mstatic iBool handleRootCommands_(iWidget *root, const char *cmd) {[m if (equal_Command(cmd, "menu.open")) {[m iWidget *button = pointer_Command(cmd);[m iWidget *menu = findChild_Widget(button, "menu");[m [32m+[m[32m if (!menu) {[m [32m+[m[32m /* Independent popup window. */[m [32m+[m[32m postCommand_App("cancel");[m [32m+[m[32m return iTrue;[m [32m+[m[32m }[m const iBool isPlacedUnder = argLabel_Command(cmd, "under");[m iAssert(menu);[m if (!isVisible_Widget(menu)) {[m [36m@@ -327,7 +332,7 @@[m [mstatic iBool handleRootCommands_(iWidget *root, const char *cmd) {[m : topLeft_Rect(bounds_Widget(button)));[m }[m else {[m [31m- closeMenu_Widget(menu);[m [32m+[m[32m /* Already open, do nothing. */[m }[m return iTrue;[m }[m [36m@@ -1513,6 +1518,8 @@[m [mvoid createUserInterface_Root(iRoot *d) {[m iLabelWidget *navMenu =[m makeMenuButton_LabelWidget(menu_Icon, navMenuItems_, iElemCount(navMenuItems_));[m # endif[m [32m+[m[32m setFrameColor_Widget(findChild_Widget(as_Widget(navMenu), "menu"),[m [32m+[m[32m uiSeparator_ColorId);[m setCommand_LabelWidget(navMenu, collectNewCStr_String("menu.open under:1"));[m setAlignVisually_LabelWidget(navMenu, iTrue);[m setId_Widget(addChildFlags_Widget(navBar, iClob(navMenu), collapse_WidgetFlag), "navbar.menu");[m [1mdiff --git a/src/ui/util.c b/src/ui/util.c[m [1mindex 5cd24ce4..a45b1a5c 100644[m [1m--- a/src/ui/util.c[m [1m+++ b/src/ui/util.c[m [36m@@ -700,9 +700,6 @@[m [mstatic iBool menuHandler_(iWidget *menu, const char *cmd) {[m }[m if ((equal_Command(cmd, "mouse.clicked") || equal_Command(cmd, "mouse.missed")) &&[m arg_Command(cmd)) {[m [31m- if (hitChild_Window(get_Window(), coord_Command(cmd)) == parentMenuButton_(menu)) {[m [31m- return iFalse;[m [31m- }[m /* Dismiss open menus when clicking outside them. */[m closeMenu_Widget(menu);[m return iTrue;[m [1mdiff --git a/src/ui/window.c b/src/ui/window.c[m [1mindex 4c78b5fe..eb9021ad 100644[m [1m--- a/src/ui/window.c[m [1m+++ b/src/ui/window.c[m [36m@@ -840,7 +840,6 @@[m [mstatic void savePlace_MainWindow_(iAny *mainWindow) {[m if (isNormalPlacement_MainWindow_(d)) {[m iInt2 newPos;[m SDL_GetWindowPosition(d->base.win, &newPos.x, &newPos.y);[m [31m- printf("savePlace_MainWindow_ sets normalRect %d,%d\n", newPos.x, newPos.y); fflush(stdout);[m d->place.normalRect.pos = newPos;[m iInt2 border = zero_I2();[m #if !defined(iPlatformApple)[m [36m@@ -1136,6 +1135,9 @@[m [miBool processEvent_Window(iWindow *d, const SDL_Event *ev) {[m wasUsed = dispatchEvent_Window(d, &event);[m }[m if (!wasUsed) {[m [32m+[m[32m if (event.type == SDL_MOUSEBUTTONDOWN) {[m [32m+[m[32m closePopups_App(iFalse);[m [32m+[m[32m }[m /* As a special case, clicking the middle mouse button can be used for pasting[m from the clipboard. */[m if (event.type == SDL_MOUSEBUTTONDOWN && event.button.button == SDL_BUTTON_MIDDLE) {[m [36m@@ -1264,8 +1266,7 @@[m [miBool dispatchEvent_Window(iWindow *d, const SDL_Event *ev) {[m }[m }[m if (d->hover != oldHover) {[m [31m- refresh_Widget(oldHover);[m [31m- refresh_Widget(d->hover);[m [32m+[m[32m refresh_Widget(d->hover); /* Note: oldHover may have been deleted */[m }[m return wasUsed;[m }[m [36m@@ -1868,8 +1869,8 @@[m [mint snap_MainWindow(const iMainWindow *d) {[m iWindow *newPopup_Window(iInt2 screenPos, iWidget *rootWidget) {[m start_PerfTimer(newPopup_Window);[m const iBool oldSw = forceSoftwareRender_App();[m [31m- /* On macOS, SDL seems to want to not use HiDPI with software rendering. */[m #if !defined (iPlatformApple)[m [32m+[m[32m /* On macOS, SDL seems to want to not use HiDPI with software rendering. */[m setForceSoftwareRender_App(iTrue);[m #endif[m SDL_Rect usableRect;[m [36m@@ -1906,7 +1907,5 @@[m [miWindow *newPopup_Window(iInt2 screenPos, iWidget *rootWidget) {[m #if !defined (NDEBUG)[m stop_PerfTimer(newPopup_Window);[m #endif[m [31m-// SDL_PumpEvents();[m [31m-// processEvents_App(postedEventsOnly_AppEventMode);[m return win;[m }[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).