vbox: stop input processing if vm is powered down
avoids tons of red messages about the fact that vm is already down
This commit is contained in:
parent
6aba4871a7
commit
676d05b751
|
@ -31,6 +31,7 @@
|
||||||
#include "../vmm.h"
|
#include "../vmm.h"
|
||||||
|
|
||||||
static const bool debug = false;
|
static const bool debug = false;
|
||||||
|
static bool vm_down = false;
|
||||||
|
|
||||||
static Genode::Attached_rom_dataspace *clipboard_rom = nullptr;
|
static Genode::Attached_rom_dataspace *clipboard_rom = nullptr;
|
||||||
static Genode::Reporter *clipboard_reporter = nullptr;
|
static Genode::Reporter *clipboard_reporter = nullptr;
|
||||||
|
@ -135,6 +136,8 @@ void fireStateChangedEvent(IEventSource* aSource,
|
||||||
if (a_state != MachineState_PoweredOff)
|
if (a_state != MachineState_PoweredOff)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
vm_down = true;
|
||||||
|
|
||||||
genode_env().parent().exit(0);
|
genode_env().parent().exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,6 +181,13 @@ void GenodeConsole::update_video_mode()
|
||||||
|
|
||||||
void GenodeConsole::handle_input()
|
void GenodeConsole::handle_input()
|
||||||
{
|
{
|
||||||
|
/* disable input processing if vm is powered down */
|
||||||
|
if (vm_down && (_vbox_mouse || _vbox_keyboard)) {
|
||||||
|
_vbox_mouse = nullptr;
|
||||||
|
_vbox_keyboard = nullptr;
|
||||||
|
_input.sigh(Genode::Signal_context_capability());
|
||||||
|
}
|
||||||
|
|
||||||
static LONG64 mt_events [64];
|
static LONG64 mt_events [64];
|
||||||
unsigned mt_number = 0;
|
unsigned mt_number = 0;
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "vmm.h"
|
#include "vmm.h"
|
||||||
|
|
||||||
static const bool debug = false;
|
static const bool debug = false;
|
||||||
|
static bool vm_down = false;
|
||||||
|
|
||||||
static Genode::Attached_rom_dataspace *clipboard_rom = nullptr;
|
static Genode::Attached_rom_dataspace *clipboard_rom = nullptr;
|
||||||
static Genode::Reporter *clipboard_reporter = nullptr;
|
static Genode::Reporter *clipboard_reporter = nullptr;
|
||||||
|
@ -74,6 +75,8 @@ void fireStateChangedEvent(IEventSource* aSource,
|
||||||
if (a_state != MachineState_PoweredOff)
|
if (a_state != MachineState_PoweredOff)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
vm_down = true;
|
||||||
|
|
||||||
genode_env().parent().exit(0);
|
genode_env().parent().exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,6 +125,13 @@ void GenodeConsole::update_video_mode()
|
||||||
|
|
||||||
void GenodeConsole::handle_input()
|
void GenodeConsole::handle_input()
|
||||||
{
|
{
|
||||||
|
/* disable input processing if vm is powered down */
|
||||||
|
if (vm_down && (_vbox_mouse || _vbox_keyboard)) {
|
||||||
|
_vbox_mouse = nullptr;
|
||||||
|
_vbox_keyboard = nullptr;
|
||||||
|
_input.sigh(Genode::Signal_context_capability());
|
||||||
|
}
|
||||||
|
|
||||||
static LONG64 mt_events [64];
|
static LONG64 mt_events [64];
|
||||||
unsigned mt_number = 0;
|
unsigned mt_number = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user