-
Notifications
You must be signed in to change notification settings - Fork 283
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
Conversation
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. |
I also made revery-ui/revery#862, which will fix the taskbar disappearing when maximized 😃 |
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! |
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. |
That's a great point @CrossR! That should be an easy fix. Thanks! |
@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! |
@CrossR I just pushed a commit that doesn't "render" the |
There was a problem hiding this 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 !
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 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. |
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.