Make IsWindowUnicode work in the case when window belongs to another
process.

diff --git a/server/protocol.def b/server/protocol.def
index 2f6556e..d79d5ef 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1788,6 +1788,7 @@
     process_id_t   pid;         /* process owning the window */
     thread_id_t    tid;         /* thread owning the window */
     atom_t         atom;        /* class atom */
+    int            is_unicode;  /* ANSI or unicode */
 @END
 
 
@@ -1799,6 +1800,7 @@
     unsigned int   ex_style;      /* window extended style */
     unsigned int   id;            /* window id */
     void*          instance;      /* creator instance */
+    int            is_unicode;    /* ANSI or unicode */
     void*          user_data;     /* user-specific data */
     int            extra_offset;  /* offset to set in extra bytes */
     size_t         extra_size;    /* size to set in extra bytes */
@@ -1817,6 +1819,7 @@
 #define SET_WIN_INSTANCE  0x08
 #define SET_WIN_USERDATA  0x10
 #define SET_WIN_EXTRA     0x20
+#define SET_WIN_UNICODE   0x40
 
 
 /* Set the parent of a window */
diff --git a/server/trace.c b/server/trace.c
index 1dcfa06..4f8d784 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -2249,7 +2249,8 @@
     fprintf( stderr, " last_active=%p,", req->last_active );
     fprintf( stderr, " pid=%04x,", req->pid );
     fprintf( stderr, " tid=%04x,", req->tid );
-    fprintf( stderr, " atom=%04x", req->atom );
+    fprintf( stderr, " atom=%04x,", req->atom );
+    fprintf( stderr, " is_unicode=%d", req->is_unicode );
 }
 
 static void dump_set_window_info_request( const struct set_window_info_request *req )
@@ -2260,6 +2261,7 @@
     fprintf( stderr, " ex_style=%08x,", req->ex_style );
     fprintf( stderr, " id=%08x,", req->id );
     fprintf( stderr, " instance=%p,", req->instance );
+    fprintf( stderr, " is_unicode=%d,", req->is_unicode );
     fprintf( stderr, " user_data=%p,", req->user_data );
     fprintf( stderr, " extra_offset=%d,", req->extra_offset );
     fprintf( stderr, " extra_size=%d,", req->extra_size );
diff --git a/server/window.c b/server/window.c
index 9904c39..1d6dbdc 100644
--- a/server/window.c
+++ b/server/window.c
@@ -73,6 +73,7 @@
     unsigned int     ex_style;        /* window extended style */
     unsigned int     id;              /* window id */
     void*            instance;        /* creator instance */
+    int              is_unicode;      /* ANSI or unicode */
     void*            user_data;       /* user-specific data */
     WCHAR           *text;            /* window caption text */
     unsigned int     paint_flags;     /* various painting flags */
@@ -354,6 +355,7 @@
     win->ex_style       = 0;
     win->id             = 0;
     win->instance       = NULL;
+    win->is_unicode     = 1;
     win->user_data      = NULL;
     win->text           = NULL;
     win->paint_flags    = 0;
@@ -1393,6 +1395,7 @@
     {
         reply->full_handle = win->handle;
         reply->last_active = win->handle;
+        reply->is_unicode  = win->is_unicode;
         if (get_user_object( win->last_active, USER_WINDOW )) reply->last_active = win->last_active;
         if (win->thread)
         {
@@ -1440,6 +1443,7 @@
     if (req->flags & SET_WIN_EXSTYLE) win->ex_style = req->ex_style;
     if (req->flags & SET_WIN_ID) win->id = req->id;
     if (req->flags & SET_WIN_INSTANCE) win->instance = req->instance;
+    if (req->flags & SET_WIN_UNICODE) win->is_unicode = req->is_unicode;
     if (req->flags & SET_WIN_USERDATA) win->user_data = req->user_data;
     if (req->flags & SET_WIN_EXTRA) memcpy( win->extra_bytes + req->extra_offset,
                                             &req->extra_value, req->extra_size );