[Spice-devel] [PATCH spice-streaming-agent] Use mnemonic to check for cursor limits

Frediano Ziglio fziglio at redhat.com
Mon Nov 13 14:58:34 UTC 2017


Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 src/spice-streaming-agent.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index 973192b..11769ff 100644
--- a/src/spice-streaming-agent.cpp
+++ b/src/spice-streaming-agent.cpp
@@ -289,7 +289,8 @@ static void usage(const char *progname)
 
 static void send_cursor(const XFixesCursorImage &image)
 {
-    if (image.width >= 1024 || image.height >= 1024)
+    if (image.width >= STREAM_MSG_CURSOR_SET_MAX_WIDTH ||
+        image.height >= STREAM_MSG_CURSOR_SET_MAX_HEIGHT)
         return;
 
     size_t cursor_size =
-- 
2.13.6



More information about the Spice-devel mailing list