Skip to content

"Maximize Window" button computes wrong window size on dual-monitor system #98

@MinnieTheMoocher

Description

@MinnieTheMoocher

Image

Describe the bug
When clicking the "Maximize Window" Button on a dual-monitor Windows system,
this only works correctly on the primary monitor.
There, the resulting window size is correctly computed and the window correctly placed.
When doing this on the secondary monitor, the size is computed wrongly:
when the Windows Taskbar is placed vertically on the main monitor,
this width is lacking from the computed new LDView window size.
LDView assumes that the Windows Taskbar is being displayed on all monitors and subtracts
this seemingly from the resulting window size. But this only must be done when the Taskbar
really is present on that monitor.

To Reproduce
Steps to reproduce the behavior:

  1. Start LDview on Windows multi-monitor system
  2. Resize its window to some non-maximized size
  3. Move the window to the primary monitor
  4. Click the "Maximize" Button: observe that the size is computed correctly
  5. Resize its window to some non-maximized size
  6. Move the window to the secondary monitor
  7. Click the "Maximize" Button: observe that the size is computed wrongly

Expected behavior
The computation of the new window size currently always subtracts the dimensions of the Windows Taskbar
because it assumes that it is visible. But this is not the case on all monitors. A check needs to be added
to correct the computation.

Screenshots
(see attachment to this post)

Platform (please complete the following information):

  • OS: Windows 7 (yes, I have not yet upgraded to 10 or 11)
  • Version: LDView 4.6 (x64) (7 May, 2025)
  • CPU Architecture: x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions