Commit 1b13b853 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Win32: escape fullscreen with the escape key

parent 46a7255a
...@@ -898,6 +898,11 @@ LRESULT CALLBACK VLCFullScreenWnd::FSWndWindowProc(HWND hWnd, UINT uMsg, WPARAM ...@@ -898,6 +898,11 @@ LRESULT CALLBACK VLCFullScreenWnd::FSWndWindowProc(HWND hWnd, UINT uMsg, WPARAM
} }
break; break;
} }
case WM_KEYDOWN: {
if (fs_data)
fs_data->_WindowsManager->OnKeyDownEvent(wParam);
break;
}
default: default:
return DefWindowProc(hWnd, uMsg, wParam, lParam); return DefWindowProc(hWnd, uMsg, wParam, lParam);
} }
...@@ -1064,6 +1069,16 @@ bool VLCWindowsManager::IsFullScreen() ...@@ -1064,6 +1069,16 @@ bool VLCWindowsManager::IsFullScreen()
return 0!=_FSWnd && 0!=_HolderWnd && GetParent(_HolderWnd->hWnd())==_FSWnd->getHWND(); return 0!=_FSWnd && 0!=_HolderWnd && GetParent(_HolderWnd->hWnd())==_FSWnd->getHWND();
} }
void VLCWindowsManager::OnKeyDownEvent(UINT uKeyMsg)
{
switch(uKeyMsg){
case VK_ESCAPE:
case 'F':
EndFullScreen();
break;
}
}
void VLCWindowsManager::OnMouseEvent(UINT uMouseMsg) void VLCWindowsManager::OnMouseEvent(UINT uMouseMsg)
{ {
switch(uMouseMsg){ switch(uMouseMsg){
......
...@@ -285,6 +285,7 @@ public: ...@@ -285,6 +285,7 @@ public:
bool getNewMessageFlag() const bool getNewMessageFlag() const
{return _b_new_messages_flag;}; {return _b_new_messages_flag;};
public: public:
void OnKeyDownEvent(UINT uKeyMsg);
void OnMouseEvent(UINT uMouseMsg); void OnMouseEvent(UINT uMouseMsg);
private: private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment