On Mittwoch 13 Februar 2008, Divan Burger wrote:
> 

What is the problem without the patch?
is the caption bar drawn too high 1 pixel?

I ask because i have a patch that restores the 1 pixel
high line between the caption bar and the client area
(and at the same time decreases the height of the caption bar)
see it attached

for the NC_DrawXXXButton functions:
you also need to update hittest calculation
else the wrong buttons are activated.
For example when you press the mouse down on the left side of the close 
button, but maximize gets activated

>     case SM_CYCAPTION:
>         if (!spi_loaded[SPI_NONCLIENTMETRICS_IDX]) load_nonclient_metrics();
>-        return nonclient_metrics.iCaptionHeight + 1;
>+        return nonclient_metrics.iCaptionHeight;

this breaks a test in sysparams.c:2416
ok_gsm( SM_CYCAPTION, ncm.iCaptionHeight+1);
and 5 other tests

Greetings Peter
From 62066e37c5a01155eff03b01af76010a521cd114 Mon Sep 17 00:00:00 2001
From: Peter Oberndorfer <[EMAIL PROTECTED]>
Date: Wed, 9 Jan 2008 17:22:39 +0100
Subject: [PATCH] fix caption bar being too high by 1 pixel
To: [EMAIL PROTECTED]

this problem was introduced in commit 567b6facab5623857b399c80c96db97d3344c8ac
Add support for drawing gradient captions.
---
 dlls/user32/nonclient.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c
index 503f7c1..1cdcbf6 100644
--- a/dlls/user32/nonclient.c
+++ b/dlls/user32/nonclient.c
@@ -917,7 +917,7 @@ static void  NC_DrawCaption( HDC  hdc, RECT *rect, HWND hwnd, DWORD  style,
     r.bottom--;
 
     SystemParametersInfoW (SPI_GETGRADIENTCAPTIONS, 0, &gradient, 0);
-    NC_DrawCaptionBar (hdc, rect, style, active, gradient);
+    NC_DrawCaptionBar (hdc, &r, style, active, gradient);
 
     if ((style & WS_SYSMENU) && !(exStyle & WS_EX_TOOLWINDOW)) {
         if (NC_DrawSysButton (hwnd, hdc, FALSE))
-- 
1.5.4



Reply via email to