Skip to content

Conversation

@almarklein
Copy link
Member

This helps with #138. The logic surrounding the selection of the present_method was not great, with some backends taking the argument in their __init__ to handle it. Now the base class handles it uniformly. Nevertheless, the backend eventually decides what method is selected, and it is clearly defined when this happens, so the backend can make preparations. E.g. if Qt uses 'bitmap', the winid is not even queried.

Very concrete:

  • Rename canvas._rc_get_present_methods() -> _rc_present_info(present_methods)
  • Previously: the base class queries the canvas (backend) for the methods it supports and then selects a method.
  • Now: the base class asks the canvas (backend) to select a method, providing the available methods (based on what the context supports, and user overrides).

@almarklein almarklein marked this pull request as ready for review January 15, 2026 12:24
@almarklein almarklein merged commit d4df1c9 into main Jan 15, 2026
38 of 39 checks passed
@almarklein almarklein deleted the render_method branch January 15, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants