From 45218b0f61b0004ef982b3d9c3f2e3c35e0f9648 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Sun, 8 Mar 2020 12:52:04 +0100 Subject: [PATCH] Fixes keyboard input buffer problem when opening a modal dialog --- README.md | 9 ++++----- src/fapplication.cpp | 1 - src/fdialog.cpp | 4 ++++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b5d66b9e..45bfd224 100644 --- a/README.md +++ b/README.md @@ -248,16 +248,15 @@ Class digramm └────────────────┘ -License -------- -GNU Lesser General Public License Version 3 - 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 -------------------------- -https://github.com/gansm/finalcut/issues LGPLv3 +https://github.com/gansm/finalcut/issues +License +------- +GNU Lesser General Public License Version 3 LGPLv3 diff --git a/src/fapplication.cpp b/src/fapplication.cpp index 41beb190..d868ee04 100644 --- a/src/fapplication.cpp +++ b/src/fapplication.cpp @@ -211,7 +211,6 @@ bool FApplication::sendEvent ( const FObject* receiver case fc::ChildFocusIn_Event: case fc::ChildFocusOut_Event: case fc::Accelerator_Event: - keyboard->clearKeyBuffer(); return false; default: diff --git a/src/fdialog.cpp b/src/fdialog.cpp index ed32ebab..fd3c4bae 100644 --- a/src/fdialog.cpp +++ b/src/fdialog.cpp @@ -26,6 +26,7 @@ #include "final/fcombobox.h" #include "final/fdialog.h" #include "final/fevent.h" +#include "final/fkeyboard.h" #include "final/fmenuitem.h" #include "final/fstatusbar.h" #include "final/ftooltip.h" @@ -98,7 +99,10 @@ bool FDialog::setModal (bool enable) setFlags().modal = enable; if ( enable ) + { setModalDialogCounter()++; + getFKeyboard()->clearKeyBuffer(); + } else setModalDialogCounter()--;