Skip to content

fix: consider FocusIn when X11 devdraw repaints; remove a delaying check#747

Open
markvanatten wants to merge 1 commit into9fans:masterfrom
markvanatten:devdraw-repair
Open

fix: consider FocusIn when X11 devdraw repaints; remove a delaying check#747
markvanatten wants to merge 1 commit into9fans:masterfrom
markvanatten:devdraw-repair

Conversation

@markvanatten
Copy link
Copy Markdown
Contributor

This improves on commit b3741e6, by repainting also when FocusIn occurs, and also by now drawing the current image once again in case devdraw happens to be busy working on the next. The problems with blank windows these improvements solve became apparent under use of one or more instances of the X server intensive winwatch, for example one per virtual desktop. (Only one instance would need to run if a rio window could be made to stick.)

@markvanatten
Copy link
Copy Markdown
Contributor Author

This fix was partially generated by an LLM.

break;
case FocusIn:
case Expose: /* Handle standard Expose here too for consistency */
/* * Force a copy from backing store (screenpm) to the window.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formatting is kind of strange; it looks like a newline (and indentation) following the opening /* was swallowed?

XCopyArea(_x.display, w->screenpm, w->drawable, _x.gccopy,
0, 0, Dx(w->screenr), Dy(w->screenr), 0, 0);
}
/* * If this was a real Expose event, we still let standard handling
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

case FocusIn:
case Expose: /* Handle standard Expose here too for consistency */
/* * Force a copy from backing store (screenpm) to the window.
* We removed the (screenpm == nextscreenpm) check because
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove this. LLMs like to tell you what they removed; usually it's superfluous, or belongs in the commit message, not in a comment.

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