[Spice-devel] [PATCH] display/driver: DisableQXLPrimarySurface: add hide_mouse parameter (reused in DrvAssertModeDisable later)
Alon Levy
alevy at redhat.com
Wed Jul 6 05:34:48 PDT 2011
Cc: Yonit Halperin <yhalperi at redhat.com>
---
display/driver.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/display/driver.c b/display/driver.c
index 1e9b833..4a80202 100644
--- a/display/driver.c
+++ b/display/driver.c
@@ -606,9 +606,11 @@ static VOID CreatePrimarySurface(PDev *pdev, UINT32 depth, UINT32 format,
async_io(pdev, pdev->create_primary_async_port, pdev->create_primary_port, 0);
}
-static void DestroyPrimarySurface(PDev *pdev)
+static void DestroyPrimarySurface(PDev *pdev, int hide_mouse)
{
- HideMouse(pdev);
+ if (hide_mouse) {
+ HideMouse(pdev);
+ }
async_io(pdev, pdev->destroy_primary_async_port, pdev->destroy_primary_port, 0);
}
@@ -913,12 +915,12 @@ err:
return NULL;
}
-VOID DisableQXLPrimarySurface(PDev *pdev)
+VOID DisableQXLPrimarySurface(PDev *pdev, int hide_mouse)
{
DrawArea drawarea;
if (pdev->surf_enable) {
- DestroyPrimarySurface(pdev);
+ DestroyPrimarySurface(pdev, hide_mouse);
pdev->surf_enable = FALSE;
}
}
@@ -935,8 +937,7 @@ VOID DrvDisableSurface(DHPDEV in_pdev)
DEBUG_PRINT((pdev, 1, "%s: 0x%lx\n", __FUNCTION__, pdev));
- DisableQXLPrimarySurface(pdev);
-
+ DisableQXLPrimarySurface(pdev, 1 /* hide mouse */);
UnmapFB(pdev);
if (pdev->surf) {
@@ -964,7 +965,7 @@ BOOL DrvAssertMode(DHPDEV in_pdev, BOOL enable)
EnableQXLPrimarySurface(pdev);
CreateVRamSlot(pdev);
} else {
- DisableQXLPrimarySurface(pdev);
+ DisableQXLPrimarySurface(pdev, 0);
RemoveVRamSlot(pdev);
}
DEBUG_PRINT((pdev, 1, "%s: 0x%lx exit %d\n", __FUNCTION__, pdev, enable));
--
1.7.5.4
More information about the Spice-devel
mailing list