mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-08 23:24:19 +00:00
Windows: Fix a bug where windows with non-native titlebars could be maximised to the wrong size
This issue presented after the following sequence of steps: - Display a window with a non-native titlebar - Maximise it - Click the taskbar icon to minimise it - Click the taskbar icon again to maximise it After being maximised for the second time, the window bounds were too large for the display. This is because the check in WM_NCCALCSIZE was failing to determine the target monitor for the window, and therefore failing to adjust the new area appropriately. We now determine the target monitor based on the proposed new bounds of the new window, rather than the current bounds of the window, which may not be meaningful if the window is minimised.
This commit is contained in:
parent
e890736965
commit
82dc6d1c7e
1 changed files with 1 additions and 1 deletions
|
|
@ -4006,7 +4006,7 @@ private:
|
|||
// so that the client area exactly fills the available space.
|
||||
if (isFullScreen())
|
||||
{
|
||||
const auto monitor = MonitorFromWindow (hwnd, MONITOR_DEFAULTTONULL);
|
||||
const auto monitor = MonitorFromRect (param, MONITOR_DEFAULTTONULL);
|
||||
|
||||
if (monitor == nullptr)
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue