Skip to content

Commit

Permalink
NEWT/WindowsWindow.c: Simplify pointerVisible branch for calling Safe…
Browse files Browse the repository at this point in the history
…ShowCursor(..)
  • Loading branch information
sgothel committed Apr 11, 2013
1 parent db255a2 commit 2147944
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/newt/native/WindowsWindow.c
Expand Up @@ -1043,13 +1043,8 @@ static LRESULT CALLBACK wndProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lP
BOOL visibilityChangeSuccessful;
if (1 == wud->pointerVisible) {
visibilityChangeSuccessful = SafeShowCursor(TRUE);
} else {
if (-1 == wud->pointerVisible) {
visibilityChangeSuccessful = SafeShowCursor(FALSE);
} else {
// it should never happen
visibilityChangeSuccessful = FALSE;
}
} else /* -1 == wud->pointerVisible */ {
visibilityChangeSuccessful = SafeShowCursor(FALSE);
}
useDefWindowProc = visibilityChangeSuccessful ? 1 : 0;
pointerVisible = 0;
Expand Down

0 comments on commit 2147944

Please sign in to comment.