revery-ui / revery

:zap: Native, high-performance, cross-platform desktop apps - built with Reason!
https://www.outrunlabs.com/revery/
MIT License
8.06k stars 196 forks source link

Not decorated a.k.a. Borderless window on Windows resizes more than the work area rect on maximize #1001

Open vhanla opened 3 years ago

vhanla commented 3 years ago

However, if it is resized to 1 pixel less than the work area rect height, it fits almost correctly with the exception that the 1 pixel gap between the window bottom border and the taskbar is present and visible as shown in the following snapshots.

imagen The gap is visible, and might not be desireable by others, but IMHO it is better than occupying the taskbar space, and it doesn't occupying other monitor's space too. imagen

The console (debugging console output) shows that it indeed resized to 1366x727 (exactly 1 pixel less in height). I don't know if this workaround to kind of fix that issue might be suitable for this project, since I really don't know where that resizing overriding is ignoring the work area rect.

Notice that if it is less in height of the work area rect it respects the dimensions to adjust, otherwise, if height is the same or bigger than the work area rect, even this hook is overrided and re-resize is ignored. I don't know why.

These are the changes I did in order to achieve that workaround: https://github.com/vhanla/revery/commit/d19b9d1bd96d4a7c422215dd1f5e1bbd3041ae43

Bare in mind I'm new to ReasonML and it doesn't consider fullscreen mode, which I ignore is supported though.

bryphe commented 3 years ago

Just wanted to say thanks for the great investigation and detailed notes, as well as the proposed fix @vhanla !

I need to review it / test a bit and see how it integrates with some of the issues like (https://github.com/onivim/oni2/issues/3071 and https://github.com/onivim/oni2/issues/3063) - but really appreciate your help here 👍 Will be very useful when I dive into this!