Files
vectorcraft/apps
dotCooCoo 0c20ddaa02 Windows: the Wintab wheel retries a failed open, sees the pen leave and closes while another app is active
- An open that leaves no context (a failed `WTInfoW` or `WTOpenW`, or a
  window procedure that could not be put in front) is tried again for the
  same window by a pen message 2 s or more later (`RETRY_MS`), instead of
  only after the pen moves to another window. An open context is kept as
  before.
- Windows sends `WM_POINTERLEAVE` to the window procedure, so winit's
  message hook does not see it. A `WH_CALLWNDPROC` hook on the UI thread
  now hands a sent `WM_POINTERENTER` or `WM_POINTERLEAVE` to the stylus
  code, and the wheel pen's leaving starts the readings afresh. A leave
  that comes while the readings are in use takes effect at the next
  Wintab or pen message. Until the hook is installed no context opens.
- The context closes when another app becomes the active one
  (`WM_ACTIVATEAPP`, seen through the same hook), and no pen message
  opens one while the foreground window belongs to another thread, so the
  context does not stay in front of another app's context in the driver's
  overlap order.
2026-11-21 04:55:59 -08:00
..