Child Windows Positioning Problems with Multiple Monitors (Win32) #85638

Closed
opened 2021-02-15 01:36:16 +01:00 by Harley Acheson · 5 comments
Member

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 745/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 398.11

Blender Version
Broken: version: 2.93.0 Alpha, branch: Unknown, commit date: Unknown Unknown, hash: rBUnknown
Worked: never

Short description of error
On Windows, child windows are incorrectly positioned when using multiple monitors

Exact steps for others to reproduce the error

The "Properties" window is meant to be opened centered around where the mouse is positioned at that time. Because the window sizes and locations are sanity-checked, it is best to make your Blender window fairly small and positioned near the center. Then open Preferences from the Edit menu

I have three monitors, all the same size, arranged horizontally. The middle one is the "main" monitor. The following shows the results when done on each of my monitors, on older versions of Blender, in this case 2.91:

ChildWindows291.jpg

The middle monitor (top), works perfectly with Preferences positioned as desired. When done on my left-most monitor (shown bottom-left), Preferences is instead shown at the left edge of my middle monitor. My right-most monitor (shown bottom-right) opens Preferences at the right edge of my middle monitor.

Master, 2.93, is better, but not perfect:

ChildWindows293.jpg

On each monitor Preferences opens on the same monitor as the parent window. Unfortunately the positioning within that monitor is incorrect. The middle monitor again, is perfect but the left monitor shows it too far right, and the right monitor shows it too far left.

The cause of this is because we are checking the new location to see if fits using wm_window_check_position() and that logic is a bit flawed because it does not take into account the monitor origins, only the sizes. my left-most monitor has a horizontal axis that runs from -1919 to -1, the middle one from 0-1919, and the third from 1920 to 3840. But when this function is called to see if a window fits on the current monitor it only compares the numbers against 1920 and 1280.

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 745/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 398.11 **Blender Version** Broken: version: 2.93.0 Alpha, branch: Unknown, commit date: Unknown Unknown, hash: `rBUnknown` Worked: never **Short description of error** On Windows, child windows are incorrectly positioned when using multiple monitors **Exact steps for others to reproduce the error** The "Properties" window is meant to be opened centered around where the mouse is positioned at that time. Because the window sizes and locations are sanity-checked, it is best to make your Blender window fairly small and positioned near the center. Then open Preferences from the Edit menu I have three monitors, all the same size, arranged horizontally. The middle one is the "main" monitor. The following shows the results when done on each of my monitors, on **older** versions of Blender, in this case **2.91**: ![ChildWindows291.jpg](https://archive.blender.org/developer/F9802379/ChildWindows291.jpg) The middle monitor (top), works perfectly with Preferences positioned as desired. When done on my left-most monitor (shown bottom-left), Preferences is instead shown at the left edge of my middle monitor. My right-most monitor (shown bottom-right) opens Preferences at the right edge of my middle monitor. Master, 2.93, is better, but not perfect: ![ChildWindows293.jpg](https://archive.blender.org/developer/F9802390/ChildWindows293.jpg) On each monitor Preferences opens on the same monitor as the parent window. Unfortunately the positioning within that monitor is incorrect. The middle monitor again, is perfect but the left monitor shows it too far right, and the right monitor shows it too far left. The cause of this is because we are checking the new location to see if fits using wm_window_check_position() and that logic is a bit flawed because it does not take into account the monitor origins, only the sizes. my left-most monitor has a horizontal axis that runs from -1919 to -1, the middle one from 0-1919, and the third from 1920 to 3840. But when this function is called to see if a window fits on the current monitor it only compares the numbers against 1920 and 1280.
Author
Member

Added subscriber: @Harley

Added subscriber: @Harley
Harley Acheson self-assigned this 2021-02-15 01:36:41 +01:00

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @Daniel_Artistic

Added subscriber: @Daniel_Artistic

This issue was referenced by d447bd3e4a

This issue was referenced by d447bd3e4a9a793364b5f4951ad280fe0293d79e
Author
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#85638
No description provided.