[commdlg] Fix ChooseColor / pr4125
Dan Kegel
dank at kegel.com
Fri Dec 23 17:49:57 CST 2005
Signed-off-by: dank at kegel.com
Fix for http://bugs.winehq.org/show_bug.cgi?id=4125
This lets the color picker respond properly to keystrokes
This fix was made with only the most superficial understanding of the
code, but it seems reasonable.
Index: dlls/commdlg/colordlg.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/colordlg.c,v
retrieving revision 1.54
diff -d -u -r1.54 colordlg.c
--- dlls/commdlg/colordlg.c 12 Nov 2005 19:12:25 -0000 1.54
+++ dlls/commdlg/colordlg.c 23 Dec 2005 23:48:35 -0000
@@ -671,7 +671,7 @@
{
char buffer[10];
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
- lpp->updating = TRUE;
+
if (IsWindowVisible( GetDlgItem(hDlg, 0x2c6) )) /* if full size */
{
lpp->updating = TRUE;
@@ -938,7 +938,7 @@
COLORREF *cr;
LCCPRIV lpp = (LCCPRIV)GetWindowLongPtrW(hDlg, DWLP_USER);
TRACE("CC_WMCommand wParam=%x lParam=%lx\n", wParam, lParam);
- switch (wParam)
+ switch (LOWORD(wParam))
{
case 0x2c2: /* edit notify RGB */
case 0x2c3:
@@ -950,7 +950,7 @@
g = GetGValue(lpp->lpcc->rgbResult);
b= GetBValue(lpp->lpcc->rgbResult);
xx = 0;
- switch (wParam)
+ switch (LOWORD(wParam))
{
case 0x2c2: if ((xx = (i != r))) r = i; break;
case 0x2c3: if ((xx = (i != g))) g = i; break;
@@ -975,9 +975,9 @@
case 0x2c1:
if (notifyCode == EN_UPDATE && !lpp->updating)
{
- i = CC_CheckDigitsInEdit(hwndCtl , wParam == 0x2bf ? 239:240);
+ i = CC_CheckDigitsInEdit(hwndCtl , LOWORD(wParam) == 0x2bf ? 239:240);
xx = 0;
- switch (wParam)
+ switch (LOWORD(wParam))
{
case 0x2bf: if ((xx = ( i != lpp->h))) lpp->h = i; break;
case 0x2c0: if ((xx = ( i != lpp->s))) lpp->s = i; break;
--
What does Linux need to succeed on the desktop? See http://kegel.com/linux/comfort
More information about the wine-patches
mailing list