Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Windows): remove overdraw when maximized #1823

Merged
merged 3 commits into from
May 26, 2020

Conversation

zbaylin
Copy link
Member

@zbaylin zbaylin commented May 26, 2020

This is WIP as of now, because it fixes the overdraw for me, but I'm not sure it will be fixed for everyone. This addresses #1817 and the concerns brought up by @CrossR in #1801.

@CrossR and @bryphe, can you test this on your machines to make sure it's a universal fix? I want to make sure it works before it gets merged.

@zbaylin zbaylin added WIP A-workspace Area: Overall UX, editor layout, tabs/groups/splits etc. platform-windows Platform: Windows labels May 26, 2020
@zbaylin
Copy link
Member Author

zbaylin commented May 26, 2020

I forgot to mention I tested it with different levels of scaling and it seems to work, but since we had scaling issues over the weekend I want to be sure.

@zbaylin
Copy link
Member Author

zbaylin commented May 26, 2020

I also made revery-ui/revery#862, which will fix the taskbar disappearing when maximized 😃

@CrossR
Copy link
Member

CrossR commented May 26, 2020

This seems to work for me! I tested this with revery-ui/revery#72ee949 and they both work together nicely. Has fixed the overdraw issue for me, as well as my taskbar issue (3840x2160 at 150% scaling, and tested some of the niche things like moving taskbar size etc)

Its also a tiny thing, but perhaps the drag handles shouldn't be visible when maximised? I don't think its actually an issue, its just one of those tiny things. I've no idea why it is the case you can't resize when maximised...but I know its how every windows app works.

Other than that, great work!

@CrossR
Copy link
Member

CrossR commented May 26, 2020

Actually, just in case this is relevant to the revery PR (not sure where the bug lies) but something between the saving and loading of window sizes is going a bit strange. If I maximise oni2 and then close, when I reopen, it says its maximised (from the icon) but its not quite maximised.

@zbaylin
Copy link
Member Author

zbaylin commented May 26, 2020

That's a great point @CrossR! That should be an easy fix. Thanks!

@zbaylin
Copy link
Member Author

zbaylin commented May 26, 2020

@CrossR I dont think that's related to this/the revery PR -- I was having that issue off and on before as well. Definitely something I can investigate though!

@zbaylin
Copy link
Member Author

zbaylin commented May 26, 2020

@CrossR I just pushed a commit that doesn't "render" the WindowResizers when the Window is maximized. Thanks again for pointing that out!

@zbaylin zbaylin requested review from bryphe and CrossR May 26, 2020 23:37
Copy link
Member

@bryphe bryphe left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this, @zbaylin !

@vhanla
Copy link

vhanla commented Sep 17, 2020

Actually this fix is just shifting the margin ignoring the real issue with Revery which I mentioned here revery-ui/revery#1001 because the actual maximized window size is bigger than the monitor resolution.

It invades space of other monitors and taskbar area too.

I also provided a temporary workaround using SetWindowsHookEx to WH_CALLWNDPROCRECT that almost fixes the maximization under work area rect vhanla/revery@d19b9d1

However, using hooks would be the last thing to do, but I couldn't find the right place where I can manipulated main window WNDPROC for handling windows messages.

Anyhow, you can check if that workaround works in your Windows installation too, by just replacing in package.json revery resolution to my commit above mentioned.
 

package.json
"resolutions" : {
"revery": "vhanla/revery#d19b9d1",

In the following screen capture I set the UI/Root.re 's [margin(0) otherwise that margin shifting is noticeable.

As I said (in the issue reported at revery's repository page), it doesn't completely fixes that issue, since now there is a 1 pixel gap in the bottom of the window, even on a different DPI scaling, fortunately it doesn't invade space of other monitors neither taskbar area now.

BTW: I also included WS_SYSMENU and WS_MINIMIZEBOX to make it responsive to minimize and restore when clicking the taskbar icon.

Hopefully you will fix that issue. Kind regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-workspace Area: Overall UX, editor layout, tabs/groups/splits etc. platform-windows Platform: Windows WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants