GetWindow vs GetWindowWithRect

Hello.

I have the following question:

GetWindow returns this :
80765-2016-10-23-12-49-24.png

GetWindowWithRect returns this :
80766-2016-10-23-12-50-29.png

Code :

  GetWindow<TestWindow>(false, "Test");
  GetWindowWithRect<TestWindow>(new Rect(100, 100, 500, 600),false, "Test");

For some reason GetWindowWithRect returns a different window (without yellow outline)… is there any way to change the style of the window ?

Hi @Vladislav-Videnov! What’s actually happening is that when a window’s minSize and maxSize are equal (which happens when you call GetWindowWithRect()), then you lose the ability to resize it, which appears as a yellow outline on your OS. If you want to retain the ability to resize the window and also specify a rect, just set EditorWindow.position after you create or locate it. That said, I’m not sure if it is really desirable behavior that GetWindowWithRect()) is setting a min and max position, so it might be worth filing a bug report.