Fixes keyboard input buffer problem when opening a modal dialog

This commit is contained in:
Markus Gans 2020-03-08 12:52:04 +01:00
parent b58936a6a2
commit 45218b0f61
3 changed files with 8 additions and 6 deletions

View File

@ -248,16 +248,15 @@ Class digramm
└────────────────┘ └────────────────┘
</pre> </pre>
License
-------
GNU Lesser General Public License Version 3
Frequently Asked Questions Frequently Asked Questions
-------------------------- --------------------------
For general questions about FINAL CUT, likely the answer is already included in the [FAQ](doc/faq.md#frequently-asked-questions). For general questions about FINAL CUT, likely the answer is already included in the [FAQ](doc/faq.md#frequently-asked-questions).
Please send bug reports to Please send bug reports to
-------------------------- --------------------------
https://github.com/gansm/finalcut/issues <a href="https://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img width="200" align="right" src="https://camo.githubusercontent.com/726b87cc2ebaf8c40716842ff509c5f874381c8e/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f332f33622f4c47504c76335f4c6f676f2e737667" alt="LGPLv3" data-canonical-src="https://upload.wikimedia.org/wikipedia/commons/3/3b/LGPLv3_Logo.svg"></a> https://github.com/gansm/finalcut/issues
License
-------
GNU Lesser General Public License Version 3 <a href="https://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img width="200" align="right" src="https://camo.githubusercontent.com/726b87cc2ebaf8c40716842ff509c5f874381c8e/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f332f33622f4c47504c76335f4c6f676f2e737667" alt="LGPLv3" data-canonical-src="https://upload.wikimedia.org/wikipedia/commons/3/3b/LGPLv3_Logo.svg"></a>

View File

@ -211,7 +211,6 @@ bool FApplication::sendEvent ( const FObject* receiver
case fc::ChildFocusIn_Event: case fc::ChildFocusIn_Event:
case fc::ChildFocusOut_Event: case fc::ChildFocusOut_Event:
case fc::Accelerator_Event: case fc::Accelerator_Event:
keyboard->clearKeyBuffer();
return false; return false;
default: default:

View File

@ -26,6 +26,7 @@
#include "final/fcombobox.h" #include "final/fcombobox.h"
#include "final/fdialog.h" #include "final/fdialog.h"
#include "final/fevent.h" #include "final/fevent.h"
#include "final/fkeyboard.h"
#include "final/fmenuitem.h" #include "final/fmenuitem.h"
#include "final/fstatusbar.h" #include "final/fstatusbar.h"
#include "final/ftooltip.h" #include "final/ftooltip.h"
@ -98,7 +99,10 @@ bool FDialog::setModal (bool enable)
setFlags().modal = enable; setFlags().modal = enable;
if ( enable ) if ( enable )
{
setModalDialogCounter()++; setModalDialogCounter()++;
getFKeyboard()->clearKeyBuffer();
}
else else
setModalDialogCounter()--; setModalDialogCounter()--;