Skip to content

phase out wrapping of ScreenRec procs (part 1)

Part I of phasing out the wrapping of ScreenRec

Right now, many extensions are wrapping ScreenRec proc vectors (initially filled by DDX/drivers): the extensions are storing the original pointer in their private data and putting in their own one. On each call, their proc restores the original one, calls it, and switches back again. When multiple extensions doing so, they're forming a kind of daisy chain.

While that approach is looking nice and elegant on the drawing board, it's complicated, dangerous like a chainsaw and makes debugging hard, leading to pretty blurred API borders.

This queue introduces a simple approach for letting extension hook into various screen operations safely, w/o having to care much about side effects with the call chain. Extensions now can simply register their hooks and get called back - w/o ever having to mess with the ScreenRec's internal structures.

For now implemented for:

  • DestroyWindow
  • PositionWindow
  • CloseScreen
  • DestroyPixmap

See refactor: don't wrap ScreenRec procs (#1755)

Depends on:

(once dependencies are merged, this branch will be rebased)

Merge request reports

Loading