[PATCH 3/8] Implement LWS_IGNORERETURN

Nikolay Sivov bunglehead at gmail.com
Tue Oct 20 12:55:12 CDT 2009


---
 dlls/comctl32/syslink.c |    6 ++++--
 include/commctrl.h      |    1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c
index a1a6039..490d0ea 100644
--- a/dlls/comctl32/syslink.c
+++ b/dlls/comctl32/syslink.c
@@ -96,6 +96,7 @@ typedef struct
     COLORREF  VisitedColor; /* Color of visited links */
     COLORREF  BackColor;    /* Background color, set on creation */
     WCHAR     BreakChar;    /* Break Character for the current font */
+    BOOL      IgnoreReturn; /* (infoPtr->Style & LWS_IGNORERETURN) on creation */
 } SYSLINK_INFO;
 
 static const WCHAR SL_LINKOPEN[] =  { '<','a', 0 };
@@ -1451,13 +1452,13 @@ static LRESULT SYSLINK_LButtonUp (SYSLINK_INFO *infoPtr, const POINT *pt)
  */
 static BOOL SYSLINK_OnEnter (const SYSLINK_INFO *infoPtr)
 {
-    if(infoPtr->HasFocus)
+    if(infoPtr->HasFocus && !infoPtr->IgnoreReturn)
     {
         PDOC_ITEM Focus;
         int id;
         
         Focus = SYSLINK_GetFocusLink(infoPtr, &id);
-        if(Focus != NULL)
+        if(Focus)
         {
             SYSLINK_SendParentNotify(infoPtr, NM_RETURN, Focus, id);
             return TRUE;
@@ -1753,6 +1754,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
         infoPtr->BackColor = infoPtr->Style & LWS_TRANSPARENT ?
                              comctl32_color.clrWindow : comctl32_color.clrBtnFace;
         infoPtr->BreakChar = ' ';
+        infoPtr->IgnoreReturn = infoPtr->Style & LWS_IGNORERETURN;
         TRACE("SysLink Ctrl creation, hwnd=%p\n", hwnd);
         SYSLINK_SetText(infoPtr, ((LPCREATESTRUCTW)lParam)->lpszName);
         return 0;
diff --git a/include/commctrl.h b/include/commctrl.h
index ffda1f1..23a296b 100644
--- a/include/commctrl.h
+++ b/include/commctrl.h
@@ -5054,6 +5054,7 @@ static const WCHAR WC_LINK[] = { 'S','y','s','L','i','n','k',0 };
 
 /* SysLink styles */
 #define LWS_TRANSPARENT      0x0001
+#define LWS_IGNORERETURN     0x0002
 
 /* SysLink messages */
 #define LM_HITTEST           (WM_USER + 768)
-- 
1.5.6.5


--=-6drdaaBVNbHywdtL/FiQ--




More information about the wine-patches mailing list