Improved the window focus behavior on leave the menu

This commit is contained in:
Markus Gans 2015-11-08 21:50:41 +01:00
parent 98a3a1757b
commit df83751be2
2 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2015-11-08 Markus Gans <guru.mail@muenster.de>
* Activate the previous window in case if the menu is open and
the mouse click has activated no window.
2015-11-07 Markus Gans <guru.mail@muenster.de> 2015-11-07 Markus Gans <guru.mail@muenster.de>
* Improved menu focus handling * Improved menu focus handling
* Menu supports newfont * Menu supports newfont

View File

@ -3,6 +3,7 @@
#include "fapp.h" #include "fapp.h"
#include "fmenu.h" #include "fmenu.h"
#include "fstatusbar.h"
#include "fwindow.h" #include "fwindow.h"
// global application object // global application object
@ -973,6 +974,19 @@ void FApplication::processMouseEvent()
menu->hide(); menu->hide();
menu->hideSubMenus(); menu->hideSubMenus();
menu->hideSuperMenus(); menu->hideSuperMenus();
// No widget was been clicked
if ( ! clicked_widget )
{
// activate previous window
FWindow::activatePrevWindow();
FWindow::getActiveWindow()->getFocusWidget()->setFocus();
FWindow::getActiveWindow()->redraw();
if ( statusBar() )
statusBar()->drawMessage();
updateTerminal();
flush_out();
}
} }
} }