Feature/gdi minor fixes#155
Open
razielanarki wants to merge 5 commits into
Open
Conversation
…th/height in Draw/FillRoundRect
|
|
||
| // skip redraw if the update rectangle is empty | ||
| CRect updateRect; | ||
| wnd_.GetUpdateRect( &updateRect, FALSE ); |
Owner
There was a problem hiding this comment.
this might bork the repaint, since isBgRepaintNeeded_ won't be reset to false.
Contributor
Author
There was a problem hiding this comment.
hmm, that might be true, however the bg repaint would still be needed as it didn't really happen (?)
so now that i looked at the code / msdn docs for a while, it seems that isBgRepaintNeeded is set by the next case item (which is proxying from WM_ERASEBACKGROUND, and from OnSizeUser), with both cases occuring on a resize event indicating that the updateRect shouldn't be empty at all in these cases.
giving some mre tought, setting the flag here to false couldn't hurt (in the case of resizing the panel to 0 width/height)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
some minor drawing related fixes:
#define GDIPVER 0x0110instdafx.h: since we're on Win7+ already (needs Vista+). (will be useful for DWrite later, and some other things)js_panel_window.cppDraw/FillUpdateRect: instead of an error, clamp arc_width/height as w/2 and h/2 respectively.