Skip to content

Commit

Permalink
Cleanup WndProcCommon
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Jun 4, 2016
1 parent 05c4308 commit 94e16e6
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions gfx/common/win32_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,9 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
case SC_SCREENSAVE:
case SC_MONITORPOWER:
*quit = true;
return 0;
break;
}
break;

case WM_DROPFILES:
return win32_drag_query_file(hwnd, wparam);
case WM_CHAR:
Expand All @@ -327,15 +326,15 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
case WM_CLOSE:
case WM_DESTROY:
case WM_QUIT:
{
WINDOWPLACEMENT placement;
GetWindowPlacement(g_hwnd, &placement);
g_pos_x = placement.rcNormalPosition.left;
g_pos_y = placement.rcNormalPosition.top;
g_quit = true;
*quit = true;
return 0;
}
{
WINDOWPLACEMENT placement;
GetWindowPlacement(g_hwnd, &placement);
g_pos_x = placement.rcNormalPosition.left;
g_pos_y = placement.rcNormalPosition.top;
g_quit = true;
*quit = true;
}
break;
case WM_SIZE:
/* Do not send resize message if we minimize. */
if (wparam != SIZE_MAXHIDE && wparam != SIZE_MINIMIZED)
Expand All @@ -345,7 +344,7 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
g_resized = true;
}
*quit = true;
return 0;
break;
case WM_COMMAND:
if (settings->ui.menubar_enable)
win32_menu_loop(g_hwnd, wparam);
Expand Down

0 comments on commit 94e16e6

Please sign in to comment.