mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-11 00:11:46 +00:00
* Windows: a pen or a finger moves and resizes the window through the custom title bar (#7967) winit takes pen and touch input as WM_POINTER messages and Windows makes no mouse input from them, so the OS move/size loop that StartDrag/BeginResize start saw no button down and never ran. winit only clears its dragging flag when that loop ends, so after one pen try the mouse could no longer move the window either. A pen or touch press on the title bar's gap or an edge now moves or resizes the window itself (OuterPosition/InnerSize), restores a maximized window under the pen, and stops at the minimum size; the mouse still hands the move to the OS. * Pen title-bar move and resize follow the pen's own screen position (#7967) On Windows winit moves the window asynchronously (SWP_ASYNCWINDOWPOS), so the window position egui reads can be ahead of the window-relative pen position and the drag counted the move twice (an injected pen ran +687/+909 for +200/+120). The tablet hook now keeps the pen's screen pixels from GetPointerPenInfo (ptPixelLocation) while the pen is down, and a PenDrag follows that. A drag that follows the OS position no longer needs egui's pointer position: the parked mouse cursor can leave the window as it moves away, and egui-winit's PointerGone ended the drag after a few steps. It ends on release or when no touch is down.