Repository navigation
Conversation
|
cc/ @tonyganch |
There was a problem hiding this comment.
I grabbed this branch, redid bootstrap, did fresh compile, and launched on 125%, 150%, and 200% DPI.
125% looks great... which is kind of weird. Chromium 53 and earlier (back to 37 I believe) didn't support 125% DPI, they would force you down to 100% (which is what looks like is happening here). Presumably to not cause a change for end users, Chrome kept 125% scaled as 100% with Chrome 54+. @kevinsawicki is this expected with electron too? (Was anything done in libchromiumcontent)

150% looks like the first size I can pick which causes DPI scaling. I believe the logic in this PR is wrong, which causes the white borders that you'll see on the edges.

|
@TheSBros one thing you can try is basically turning non-client size calc / painting into a noop in + /** Return zero (no-op) for non-client area events when window is frameless.
+ * \see WM_NCPAINT - https://msdn.microsoft.com/en-us/library/windows/desktop/dd145212(v=vs.85).aspx
+ * \see WM_NCCALCSIZE - https://msdn.microsoft.com/en-us/library/windows/desktop/ms632634(v=vs.85).aspx
+ */
+ case WM_NCPAINT:
+ case WM_NCCALCSIZE: {
+ if (!has_frame()) {
+ *result = 0;
+ return true;
+ }
+ return false;
+ }Unfortunately, this caused rounded edges at 200% DPI |
|
@bsclifton I tried that and it caused rounded edges even on 100% DPI for me. I'll try doing some testing with higher DPI to fix the borders. Another thing I noticed while fixing this (that I did not fix) was with a normal, unmaximized frameless window on >100% DPI - the edges are cut off. This only happens in v1.5.x and higher, not on v1.4.x. |
|
@TheSBros doh, then it definitely isn't a good fix (if it caused rounded edges). Thanks for trying it 😄 Something I did notice in |
|
@bsclifton I may have come up with a fix for the rounded edges - however it requires including Uxtheme.h. Where would I add |
|
I got everything working, but it requires handling |
@TheSBros, do you have that part when everything except round edges is okay somewhere? I checked out your branch but seems like you haven't updated it. |
|
Sounds like great progress; great job @TheSBros! 😄 I'm also curious about that branch. I can help research / try a few things if you are able to make it available 😄 |
|
I've pushed the commit. I'd appreciate if someone can test it on higher DPIs (particularly 200%, 250%, 300%) - my display only goes up to 175%. |
|
I've tested a1e012e for 150%, 175%, 200% and 225%. Works well. |
|
@mst128256 That's good to hear. Any thoughts @bsclifton? |
|
Any news on that PR? |
|
@TheSBros hey, did you manage to fix the round corners? |
|
Hi folks- apologies I hadn't responded (I was out most of last week) I'll try your patch @TheSBros and see if I have any ideas |
|
@TheSBros - Is there any other issue blocking this PR? |
|
@juturu None other than the PR itself. The fix works but has a side effect of causing rounded edges on the left/right top of the frame. My efforts to work around this have been futile, so I may have to find a different method of disabling non-client paints. |
|
@TheSBros @bsclifton @juturu @tonyganch Could you try the patch in #9140? It should work fine at all DPIs without the rounded corners. |
|
Fixed by #9167. |

Fixes #5267, #8728.