Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gtk: Ensure pending draws are done before GTK draw#27988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
oscargus merged 1 commit intomatplotlib:mainfromQuLogic:gtk-ensure-draw
Mar 29, 2024

Conversation

QuLogic
Copy link
Member

PR summary

Originally, the resize event happens first, adds an idle draw callback, and then the widget draws itself. Since the draw callback only happens whenidle, it happens after the widget's draw, so the figure appears blank. After the mouse is released, the idle draw callback fires, and the figure appears again.

This is already done in the Qt backend [1], and doing so ensures the figure remains visible during resizes with the mouse.

This fixes the bug reported at#25861 (comment)

[1]

self._draw_idle()# Only does something if a draw is pending.

PR checklist

Originally, the resize event happens first, adds an idle draw callback,and then the widget draws itself. Since the draw callback only happenswhen _idle_, it happens after the draw, so the figure appears blank.After the mouse is released, the idle draw callback fires, and thefigure appears again.This is already done in the Qt backend [1], and doing so ensures thefigure remains visible during resizes with the mouse.[1]https://github.com/matplotlib/matplotlib/blob/0afc5d6ca49cf6e8aa1da76b5bab0faca2f340f2/lib/matplotlib/backends/backend_qtagg.py#L25
@oscargusoscargus merged commit78b6bdc intomatplotlib:mainMar 29, 2024
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMar 29, 2024
@QuLogicQuLogic deleted the gtk-ensure-draw branchMarch 29, 2024 05:46
dstansby added a commit that referenced this pull requestMar 29, 2024
…988-on-v3.8.xBackport PR#27988 on branch v3.8.x (gtk: Ensure pending draws are done before GTK draw)
@ksundenksunden mentioned this pull requestApr 4, 2024
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@oscargusoscargusoscargus approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.8.4
Development

Successfully merging this pull request may close these issues.

3 participants
@QuLogic@tacaswell@oscargus

[8]ページ先頭

©2009-2025 Movatter.jp