[Spice-commits] xddm/display

Alon Levy alon at kemper.freedesktop.org
Mon Jul 29 07:51:29 PDT 2013


 xddm/display/brush.c   |    4 +++-
 xddm/display/driver.c  |    2 ++
 xddm/display/pointer.c |    8 ++++++++
 3 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 2ffb6b38d5b4f3fb18c5c61437c59f0c9efbf524
Author: Alon Levy <alevy at redhat.com>
Date:   Fri Jul 26 21:10:23 2013 +0300

    display: add punting where it is missing

diff --git a/xddm/display/brush.c b/xddm/display/brush.c
index 0b9400d..fe94f1c 100644
--- a/xddm/display/brush.c
+++ b/xddm/display/brush.c
@@ -235,10 +235,12 @@ BOOL APIENTRY DrvRealizeBrush(BRUSHOBJ *brush, SURFOBJ *target, SURFOBJ *pattern
     int size;
 
     if (!(pdev = (PDev *)target->dhpdev)) {
-        ASSERT(NULL, 0);
+        DEBUG_PRINT((NULL, 0, "%s: err no pdev\n", __FUNCTION__));
         return FALSE;
     }
 
+    PUNT_IF_DISABLED(pdev);
+
     DEBUG_PRINT((pdev, 3, "%s\n", __FUNCTION__));
 
     if (mask) {
diff --git a/xddm/display/driver.c b/xddm/display/driver.c
index d7fdbf7..b8050de 100644
--- a/xddm/display/driver.c
+++ b/xddm/display/driver.c
@@ -1414,6 +1414,8 @@ HBITMAP APIENTRY DrvCreateDeviceBitmap(DHPDEV dhpdev, SIZEL size, ULONG format)
 
     pdev = (PDev *)dhpdev;
 
+    PUNT_IF_DISABLED(pdev);
+
     if (!pdev->create_non_primary_surfaces) {
         return FALSE;
     }
diff --git a/xddm/display/pointer.c b/xddm/display/pointer.c
index d38a207..17fa3c5 100644
--- a/xddm/display/pointer.c
+++ b/xddm/display/pointer.c
@@ -43,6 +43,8 @@ ULONG APIENTRY DrvSetPointerShape(SURFOBJ *surf, SURFOBJ *mask, SURFOBJ *color_p
         return SPS_ERROR;
     }
 
+    PUNT_IF_DISABLED(pdev);
+
     DEBUG_PRINT((pdev, 3, "%s\n", __FUNCTION__));
 
     if (flags & SPS_CHANGE) {
@@ -129,6 +131,12 @@ VOID APIENTRY DrvMovePointer(SURFOBJ *surf, LONG pos_x, LONG pos_y, RECTL *area)
         return;
     }
 
+    if (!pdev->enabled) {
+        DEBUG_PRINT((pdev, 3, "%s: ignoring when device is disabled\n",
+                    __FUNCTION__));
+        return;
+    }
+
     cursor_cmd = CursorCmd(pdev);
     if (pos_x < 0) {
         cursor_cmd->type = QXL_CURSOR_HIDE;


More information about the Spice-commits mailing list