Просмотр исходного кода

device: pass correct window style to AdjustWindowRect()

Daniele Bartolini 5 лет назад
Родитель
Сommit
dfe281f245
2 измененных файлов с 6 добавлено и 1 удалено
  1. 4 0
      docs/changelog.rst
  2. 2 1
      src/device/main_windows.cpp

+ 4 - 0
docs/changelog.rst

@@ -9,6 +9,10 @@ Changelog
 
 * Windows: fixed garbage data written past EOF in some circumnstances.
 
+**Tools**
+
+* Windows: fixed wrong Editor View window size.
+
 0.42.0
 ------
 *05 Mar 2021*

+ 2 - 1
src/device/main_windows.cpp

@@ -663,12 +663,13 @@ struct WindowWin : public Window
 		_width = width;
 		_height = height;
 
+		DWORD style = GetWindowLongA(s_wdvc._hwnd, GWL_STYLE);
 		RECT rect;
 		rect.left   = 0;
 		rect.top    = 0;
 		rect.right  = _width;
 		rect.bottom = _height;
-		AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE);
+		AdjustWindowRect(&rect, style, FALSE);
 
 		MoveWindow(s_wdvc._hwnd
 			, _x