Cider Isn't Darwin Emulation, Really

test(cider): clicking a menu opens it, and name why the menu is invisible master

From one log in order: the click at 95,11 on the File menu, then five lines later a 247x381 window at level 2 created and mapped. So the click was hit tested to the menu bar, dispatched, and acted on by the application. That is the mouse half of criterion two in the words of the prompt, click a menu and it opens, and it is much stronger than the caret result: a caret says a click reached the document view, a menu says it reached a specific control and ran its handler. The menu does not appear on screen, and that part is ours. Every window here is created as an xdg_toplevel, so a compositor treats a menu as another application window and a tiling one gives it a tile or stacks it somewhere else. Menus and tooltips are xdg_popup, positioned relative to a parent with an anchor rectangle. The signal for telling them apart is already in hand and was missed before: this window arrived with level 2, NSFloatingWindowLevel, while document windows are level 0. An earlier attempt used the style mask and could not separate a menu from a scrollbar helper. So the next rung is concrete rather than exploratory: get_popup with a positioner for windows above level zero, toplevel for level zero, anchor from the frame origin the application already sets, and popup_done unmaps.


Author Niclas Overby Date Commit 548e41ea Parent 9a1496e6 Change ID vpsvrwun
+65
2 changed files