Skip to content

Commit

Permalink
Send kfw 'obtain ticket' messages to main frame
Browse files Browse the repository at this point in the history
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@painless-security.com>

(cherry picked from commit 648f70f)

ticket: 7273
status: resolved
  • Loading branch information
Kevin Wasserman authored and tlyu committed Aug 27, 2012
1 parent 47f8828 commit 591710f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
4 changes: 4 additions & 0 deletions src/windows/leash/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
18 changes: 0 additions & 18 deletions src/windows/leashdll/lshfunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 591710f

Please sign in to comment.