From 0c0cf8b19f4f4a5ab1563e744e7451f3487308b1 Mon Sep 17 00:00:00 2001 From: Christoph Rackwitz <christoph.rackwitz@gmail.com> Date: Sat, 23 Jan 2021 16:01:07 +0100 Subject: [PATCH] highgui: remove gutter in window_w32 --- modules/highgui/src/window_w32.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index b61284dc96..50c3dc652f 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -1105,26 +1105,20 @@ static void icvScreenToClient( HWND hwnd, RECT* rect ) /* Calculatess the window coordinates relative to the upper left corner of the mainhWnd window */ static RECT icvCalcWindowRect( CvWindow* window ) { - const int gutter = 1; - RECT crect = { 0 }, trect = { 0 } , rect = { 0 }; + RECT crect = { 0 }, trect = { 0 }, rect = { 0 }; assert(window); GetClientRect(window->frame, &crect); - if(window->toolbar.toolbar) + if (window->toolbar.toolbar) { GetWindowRect(window->toolbar.toolbar, &trect); icvScreenToClient(window->frame, &trect); - SubtractRect( &rect, &crect, &trect); + SubtractRect(&rect, &crect, &trect); } else rect = crect; - rect.top += gutter; - rect.left += gutter; - rect.bottom -= gutter; - rect.right -= gutter; - return rect; }