krb5 commit: Send kfw 'obtain ticket' messages to main frame

Benjamin Kaduk kaduk at MIT.EDU
Mon Aug 27 11:52:05 EDT 2012


https://github.com/krb5/krb5/commit/648f70f51ce7d130a2ba921c33f6cc152f097440
commit 648f70f51ce7d130a2ba921c33f6cc152f097440
Author: Kevin Wasserman <kevin.wasserman at painless-security.com>
Date:   Thu Jun 14 22:57:59 2012 -0400

    Send kfw 'obtain ticket' messages to main frame
    
    Previous versions of kfw would attempt to send 'obtain tickets' messages
    directly to the 'view' window by sending to the first child of the main
    frame.  But with the ribbon UI, the ribbon toolbar is now the first child,
    so that method no longer works.  Instead we now send the message to the
    main frame and the main frame forwards to the active view.
    
    Signed-off-by: Kevin Wasserman <kevin.wasserman at painless-security.com>
    
    ticket: 7273 (new)
    queue: kfw
    target_version: 1.10.4
    tags: pullup

 src/windows/leash/MainFrm.cpp  |    4 ++++
 src/windows/leashdll/lshfunc.c |   18 ------------------
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/src/windows/leash/MainFrm.cpp b/src/windows/leash/MainFrm.cpp
index c66486e..5481586 100644
--- a/src/windows/leash/MainFrm.cpp
+++ b/src/windows/leash/MainFrm.cpp
@@ -418,6 +418,10 @@ LRESULT CMainFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
             break;
         }
         break;
+    case ID_OBTAIN_TGT_WITH_LPARAM:
+        GetActiveView()->SendMessage(ID_OBTAIN_TGT_WITH_LPARAM, wParam,
+                                     lParam);
+        break;
 	}
 
     if ( oldMin != m_isMinimum ) {
diff --git a/src/windows/leashdll/lshfunc.c b/src/windows/leashdll/lshfunc.c
index 614bb79..bd12121 100644
--- a/src/windows/leashdll/lshfunc.c
+++ b/src/windows/leashdll/lshfunc.c
@@ -2662,23 +2662,6 @@ Leash_reset_defaults(void)
     Leash_reset_default_preserve_kinit_settings();
 }
 
-static BOOL CALLBACK
-EnumChildProc(HWND hwnd, LPARAM lParam)
-{
-    HWND * h = (HWND *)lParam;
-    *h = hwnd;
-    return FALSE;
-}
-
-
-static HWND
-FindFirstChildWindow(HWND parent)
-{
-    HWND hFirstChild = 0;
-    EnumChildWindows(parent, EnumChildProc, (LPARAM) &hFirstChild);
-    return hFirstChild;
-}
-
 static int
 acquire_tkt_send_msg(krb5_context ctx, const char * title,
 		     const char * ccachename,
@@ -2775,7 +2758,6 @@ acquire_tkt_send_msg(krb5_context ctx, const char * title,
     } else {
 	HGLOBAL 		hData;
 	HWND hLeash = FindWindow("LEASH.0WNDCLASS", NULL);
-	hLeash = FindFirstChildWindow(hLeash);
 
 	/* construct a marshalling of data
 	 *   <title><principal><realm><ccache>


More information about the cvs-krb5 mailing list