mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-22 12:06:00 +00:00
vbox: respond to zero-resized framebuffer
This commit is contained in:
parent
331225dfcb
commit
a2bb96723a
@ -1 +1 @@
|
||||
d0f14330729a8ef3234c8a569e183e230c28e100
|
||||
794a16b709f2e4c34e27cc7f9bf15711c6d9e450
|
||||
|
@ -81,7 +81,6 @@ STDMETHODIMP Console::COMSETTER(UseHostClipboard)(BOOL aUseHostClipboard)
|
||||
HRESULT Console::Reset() DUMMY(E_FAIL)
|
||||
HRESULT Console::Pause() DUMMY(E_FAIL)
|
||||
HRESULT Console::Resume() DUMMY(E_FAIL)
|
||||
HRESULT Console::PowerButton() DUMMY(E_FAIL)
|
||||
HRESULT Console::SleepButton() DUMMY(E_FAIL)
|
||||
HRESULT Console::GetPowerButtonHandled(bool*) DUMMY(E_FAIL)
|
||||
HRESULT Console::GetGuestEnteredACPIMode(bool*) DUMMY(E_FAIL)
|
||||
@ -160,6 +159,13 @@ void GenodeConsole::update_video_mode()
|
||||
Genodefb *fb = dynamic_cast<Genodefb *>(d->getFramebuffer());
|
||||
LONG64 ignored = 0;
|
||||
|
||||
if (fb && (fb->w() == 0) && (fb->h() == 0)) {
|
||||
/* interpret a size of 0x0 as indication to quit VirtualBox */
|
||||
if (PowerButton() != S_OK)
|
||||
PERR("ACPI shutdown failed");
|
||||
return;
|
||||
}
|
||||
|
||||
AdditionsFacilityType_T is_graphics;
|
||||
g->GetFacilityStatus(AdditionsFacilityType_Graphics, &ignored, &is_graphics);
|
||||
|
||||
|
32
repos/ports/src/virtualbox/patches/powerbutton.patch
Normal file
32
repos/ports/src/virtualbox/patches/powerbutton.patch
Normal file
@ -0,0 +1,32 @@
|
||||
powerbutton.patch
|
||||
|
||||
diff --git a/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp b/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp
|
||||
index b0b04ad..3680be4 100644
|
||||
--- a/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp
|
||||
+++ b/src/app/virtualbox/src/VBox/Main/src-client/ConsoleImpl.cpp
|
||||
@@ -106,7 +106,9 @@
|
||||
#if 0
|
||||
#include <VBox/vmm/vmapi.h>
|
||||
#include <VBox/vmm/vmm.h>
|
||||
+#endif
|
||||
#include <VBox/vmm/pdmapi.h>
|
||||
+#if 0
|
||||
#include <VBox/vmm/pdmasynccompletion.h>
|
||||
#include <VBox/vmm/pdmnetifs.h>
|
||||
#endif
|
||||
@@ -2625,6 +2627,7 @@ STDMETHODIMP Console::Resume()
|
||||
LogFlowThisFuncLeave();
|
||||
return rc;
|
||||
}
|
||||
+#endif
|
||||
|
||||
STDMETHODIMP Console::PowerButton()
|
||||
{
|
||||
@@ -2671,6 +2674,7 @@ STDMETHODIMP Console::PowerButton()
|
||||
return rc;
|
||||
}
|
||||
|
||||
+#if 0
|
||||
STDMETHODIMP Console::GetPowerButtonHandled(BOOL *aHandled)
|
||||
{
|
||||
LogFlowThisFuncEnter();
|
@ -23,3 +23,4 @@ usb.patch
|
||||
tm_smp.patch
|
||||
posix.patch
|
||||
hostservice.patch
|
||||
powerbutton.patch
|
||||
|
Loading…
x
Reference in New Issue
Block a user