winex11: Update the cursor also for events ignored by a hook.
diff --git a/server/queue.c b/server/queue.c
index d2090cd..755d3c1 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1717,9 +1717,11 @@
             return;
         }
         input = thread->queue->input;
+        reply->cursor = input->cursor;
+        reply->count  = input->cursor_count;
     }
 
-    if (!(data = mem_alloc( sizeof(*data) )))
+    if (!req->msg || !(data = mem_alloc( sizeof(*data) )))
     {
         if (thread) release_object( thread );
         return;
@@ -1744,12 +1746,7 @@
     }
     else free( data );
 
-    if (thread)
-    {
-        reply->cursor = input->cursor;
-        reply->count  = input->cursor_count;
-        release_object( thread );
-    }
+    if (thread) release_object( thread );
 }
 
 /* post a quit message to the current queue */