Commit 8feb6d8
committed
Avoid triggering full dpi change if it's unchanged.
This is essentially a revert of the `Text.get_window_extent` change to
its dpi handling, but applies in _all_ cases.
Depending on backend, we want to avoid this extraneous dpi change,
because it can cause recursive event signals. For example, with GTK3, a
resize will trigger its event loop, which eventually causes a re-draw.
The re-draw would get to `Text.get_window_extent`, change the dpi (to
the same value), and call `Figure.set_size_inches`, which would resize
the window again. Depending on how much of the GTK event loop was
processed, this may or may not trigger another draw, recursing again and
again.
Fixes #16934.1 parent e702edd commit 8feb6d8
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
445 | 448 | | |
446 | 449 | | |
447 | 450 | | |
| |||
0 commit comments