mirror of
https://github.com/reactos/wine.git
synced 2025-01-30 16:44:21 +00:00
Add comments, fix negative value from GetCurFocus.
This commit is contained in:
parent
8b4ff10119
commit
6971e1d762
@ -201,6 +201,8 @@ TAB_DumpItemInternal(TAB_INFO *infoPtr, UINT iItem)
|
||||
}
|
||||
}
|
||||
|
||||
/* RETURNS
|
||||
* the index of the selected tab, or -1 if no tab is selected. */
|
||||
static LRESULT
|
||||
TAB_GetCurSel (HWND hwnd)
|
||||
{
|
||||
@ -209,11 +211,21 @@ TAB_GetCurSel (HWND hwnd)
|
||||
return infoPtr->iSelected;
|
||||
}
|
||||
|
||||
/* RETURNS
|
||||
* the index of the tab item that has the focus
|
||||
* NOTE
|
||||
* we have not to return negative value
|
||||
* TODO
|
||||
* test for windows */
|
||||
static LRESULT
|
||||
TAB_GetCurFocus (HWND hwnd)
|
||||
{
|
||||
TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
|
||||
|
||||
if (infoPtr->uFocus<0)
|
||||
{
|
||||
FIXME("we have not to return negative value");
|
||||
return 0;
|
||||
}
|
||||
return infoPtr->uFocus;
|
||||
}
|
||||
|
||||
@ -255,7 +267,7 @@ TAB_SetCurFocus (HWND hwnd,WPARAM wParam)
|
||||
FIXME("Should set input focus\n");
|
||||
} else {
|
||||
int oldFocus = infoPtr->uFocus;
|
||||
if (infoPtr->iSelected != iItem || infoPtr->uFocus == -1 ) {
|
||||
if (infoPtr->iSelected != iItem || oldFocus == -1 ) {
|
||||
infoPtr->uFocus = iItem;
|
||||
if (oldFocus != -1) {
|
||||
if (!TAB_SendSimpleNotify(hwnd, TCN_SELCHANGING)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user