You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The render-popup-menu function takes x-y coordinates and renders a popup-menu (pum) relative to the root widget of a renderer.
Canvases are windows and can react to mouse events, so I can use a mixin with, say, pict-canvas to make right-clicks shows a popup-window if I have a renderer. The mouse-event's x-y coordinates are relative to the canvas (!).
I get a renderer only by calling render on the full tree of views, so its root widget is from the (window …) view.
This combines to result in the x-y coordinates being relative to the wrong part of the GUI, so the pum is in the wrong place.
Translate the canvas x-y coordinates with respect to (renderer-root …). This would probably be much nicer, but I can't figure out how to do it.
Manually compute approximate coordinates based on expected layout. This doesn't sit well with me, especially since I expect to re-use some views in very different compositions or layouts.
Have you run into this in the past? How did you solve it?
The text was updated successfully, but these errors were encountered:
The
render-popup-menu
function takes x-y coordinates and renders a popup-menu (pum) relative to the root widget of a renderer.Canvases are windows and can react to mouse events, so I can use a mixin with, say,
pict-canvas
to make right-clicks shows a popup-window if I have a renderer. The mouse-event's x-y coordinates are relative to the canvas (!).I get a renderer only by calling
render
on the full tree of views, so its root widget is from the(window …)
view.This combines to result in the x-y coordinates being relative to the wrong part of the GUI, so the pum is in the wrong place.
Possible solutions I've come up with:
render-pum
via reflection (benknoble/frosthaven-manager@53c567c)(renderer-root …)
. This would probably be much nicer, but I can't figure out how to do it.Have you run into this in the past? How did you solve it?
The text was updated successfully, but these errors were encountered: