Keep track of the windows and hooks used by a thread to properly
refuse to change the thread desktop when it's in use.
diff --git a/server/thread.h b/server/thread.h
index 749b277..4a175e7 100644
--- a/server/thread.h
+++ b/server/thread.h
@@ -83,6 +83,7 @@
int affinity; /* affinity mask */
int suspend; /* suspend count */
obj_handle_t desktop; /* desktop handle */
+ int desktop_users; /* number of objects using the thread desktop */
time_t creation_time; /* Thread creation time */
time_t exit_time; /* Thread exit time */
struct token *token; /* security token associated with this thread */