Maximize button in the header is broken #88500

Closed
opened 2021-05-23 11:51:36 +02:00 by Reiner Prokein · 18 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.09

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-05-22 04:53, hash: f7b22fc3d2
Worked: Build from last week.
Caused by {4fb052f08dfd085bb0c9015add32a5d5063caf54}

Short description of error
Instead of going into windowed mode a click at the Maximize button will hide the header away. Blender is currently trapped in maximized state at the screen at which it opens up.

Exact steps for others to reproduce the error

Open Blender
Click at the Maximize button in the header.

maximized.jpg
noheader.jpg

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.09 **Blender Version** Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-05-22 04:53, hash: `f7b22fc3d2` Worked: Build from last week. Caused by {4fb052f08dfd085bb0c9015add32a5d5063caf54} **Short description of error** Instead of going into windowed mode a click at the Maximize button will hide the header away. Blender is currently trapped in maximized state at the screen at which it opens up. **Exact steps for others to reproduce the error** Open Blender Click at the Maximize button in the header. ![maximized.jpg](https://archive.blender.org/developer/F10136858/maximized.jpg) ![noheader.jpg](https://archive.blender.org/developer/F10136860/noheader.jpg)
Author

Added subscriber: @tiles

Added subscriber: @tiles
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

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

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

Can confirm the issue for 3.0.0 version, Hash: f7b22fc3d2. Definitely a regression.

Probably User interface would be a correct tag here.

Can confirm the issue for 3.0.0 version, Hash: `f7b22fc3d2`. Definitely a regression. Probably User interface would be a correct tag here.
Member

Added subscriber: @Harley

Added subscriber: @Harley
Harley Acheson self-assigned this 2021-05-23 16:53:51 +02:00
Member

Hey, I have no doubt there is something for me to fix here. In fact there is something else quite similar that i have a one-line change for, which probably fixes this too.

However, I am not able to reproduce this particular error as described here. Again, not doubting it exists, but I need to recreate it in order to confirm I've fixed it. I start with factory defaults, follow these instructions and don't see what is described. Can you flesh out the descriptions a bit more?

Hey, I have no doubt there is something for me to fix here. In fact there is something else quite similar that i have a one-line change for, which probably fixes this too. However, I am not able to reproduce this particular error as described here. Again, not doubting it exists, but I need to recreate it in order to confirm I've fixed it. I start with factory defaults, follow these instructions and don't see what is described. Can you flesh out the descriptions a bit more?
Member

Hi @Harley , as far as I can see title bar disappears after clicking the restore window button. you are on recent 3.0.0 build??

Hi @Harley , as far as I can see title bar disappears after clicking the restore window button. you are on recent 3.0.0 build??
Member

@PratikPB2123 - ...you are on recent 3.0.0 build??

Yup, master as of a few minutes ago.

@PratikPB2123 - as far as I can see title bar disappears after clicking the restore window button.

Yes, not seeing what is described. I made some changes in the window placement code for Windows just a couple of days ago, so am sure I broke this for you. But really want to recreate this so I can know when it is fixed.

Do you mind experimenting a bit on when it happens? Is it really always or does it depend on it being a certain size beforehand. Does it behave this way if you start with File / Defaults / Load Factory Settings?

> @PratikPB2123 - ...you are on recent 3.0.0 build?? Yup, master as of a few minutes ago. > @PratikPB2123 - as far as I can see title bar disappears after clicking the restore window button. Yes, not seeing what is described. I made some changes in the window placement code for Windows just a couple of days ago, so am sure I broke this for you. But really want to recreate this so I can know when it is fixed. Do you mind experimenting a bit on when it happens? Is it really always or does it depend on it being a certain size beforehand. Does it behave this way if you start with File / Defaults / Load Factory Settings?
Member

Is it really always or does it depend on it being a certain size beforehand. Does it behave this way if you start with File / Defaults / Load Factory Settings?

Happens every time. I tried with factory settings as well but behavior does not change.

Do you mind experimenting a bit on when it happens?

want me to bisect here?

> Is it really always or does it depend on it being a certain size beforehand. Does it behave this way if you start with File / Defaults / Load Factory Settings? Happens every time. I tried with factory settings as well but behavior does not change. >Do you mind experimenting a bit on when it happens? want me to bisect here?
Member

@PratikPB2123 - Do you mind experimenting a bit on when it happens? want me to bisect here?

Yes, please, but I'm assuming that you'll find the culprit is https://developer.blender.org/rB4fb052f08dfd085bb0c9015add32a5d5063caf54

If so, what I'd really like is for you to load up ...blender\intern\ghost\intern\GHOST_WindowWin32.cpp

On line 135 you will see a line that starts with AdjustWindowRectEx(..

Just AFTER that line add a new one like this:

win_rect.top = max(monitor.rcWork.top, win_rect.top);

And I'm hoping your problem will go away.

> @PratikPB2123 - Do you mind experimenting a bit on when it happens? want me to bisect here? Yes, please, but I'm assuming that you'll find the culprit is https://developer.blender.org/rB4fb052f08dfd085bb0c9015add32a5d5063caf54 If so, what I'd really like is for you to load up ...blender\intern\ghost\intern\GHOST_WindowWin32.cpp On line 135 you will see a line that starts with `AdjustWindowRectEx(..` Just **AFTER** that line add a new one like this: `win_rect.top = max(monitor.rcWork.top, win_rect.top);` And I'm hoping your problem will go away.
Member

Sure, I will check.

Sure, I will check.

Added subscriber: @erminos

Added subscriber: @erminos

I too can recreate it, on Win 10 and Win 7 :) Works: 695fa3a4a1, broken: f7b22fc3d2
Can trigger this all the time with NirSoft tools, like: nircmd win togglemax title "Blender"
And, with WinExplorer (on Win7) I see - when in Restored state the window Top is moved a bit more outside (-23px) than when in Maximized state (-4px)
image.png

I too can recreate it, on Win 10 and Win 7 :) Works: 695fa3a4a1a2, broken: f7b22fc3d271 Can trigger this all the time with NirSoft tools, like: `nircmd win togglemax title "Blender"` And, with WinExplorer (on Win7) I see - when in *Restored* state the window Top is moved a bit more outside (-23px) than when in *Maximized* state (-4px) ![image.png](https://archive.blender.org/developer/F10138059/image.png)
Member

win_rect.top = max(monitor.rcWork.top, win_rect.top);

With this edit in code, issue is fixed for me. just double cheking the exact commit which causes the issue.

@erminos , Thanks for the checking.

>win_rect.top = max(monitor.rcWork.top, win_rect.top); With this edit in code, issue is fixed for me. just double cheking the exact commit which causes the issue. @erminos , Thanks for the checking.
Member

Bisected. @Harley was right. Problem caused by 4fb052f08d

@Harley , do you want me to submit a patch or you want to commit that directly?

Bisected. @Harley was right. Problem caused by 4fb052f08d @Harley , do you want me to submit a patch or you want to commit that directly?
Member

You can submit if you like. I’ll add some background details to it if you do to explain why this is needed in relation to my earlier changes. In about 10 hours though.

You can submit if you like. I’ll add some background details to it if you do to explain why this is needed in relation to my earlier changes. In about 10 hours though.

This issue was referenced by 0606a37e1a

This issue was referenced by 0606a37e1a8c1e9c1abe94c19848382278ed966e
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
5 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#88500
No description provided.