Reformatted comments, fixed ticket #107 (background not being drawn).
[libguac-client-rdp.git] / src / rdp_glyph.c
index db7ba54..462d590 100644 (file)
@@ -20,6 +20,7 @@
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
+ * Matt Hortman
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -151,15 +152,15 @@ void guac_rdp_glyph_begindraw(rdpContext* context,
             context->instance->settings->color_depth, 32,
             ((rdp_freerdp_context*) context)->clrconv);
 
-    guac_client_data->foreground.red   =  fgcolor & 0x0000FF;
+    guac_client_data->foreground.blue  =  fgcolor & 0x0000FF;
     guac_client_data->foreground.green = (fgcolor & 0x00FF00) >> 8;
-    guac_client_data->foreground.blue  = (fgcolor & 0xFF0000) >> 16;
+    guac_client_data->foreground.red   = (fgcolor & 0xFF0000) >> 16;
 
-    guac_client_data->background.red    =  bgcolor & 0x0000FF;
+    guac_client_data->background.blue   =  bgcolor & 0x0000FF;
     guac_client_data->background.green  = (bgcolor & 0x00FF00) >> 8;
-    guac_client_data->background.blue   = (bgcolor & 0xFF0000) >> 16;
+    guac_client_data->background.red    = (bgcolor & 0xFF0000) >> 16;
 
-       /* paint background on destination */
+    /* Paint background on destination */
     guac_protocol_send_rect(client->socket,
             GUAC_COMP_OVER, current_layer,
             x, y, width, height,
@@ -167,6 +168,7 @@ void guac_rdp_glyph_begindraw(rdpContext* context,
             guac_client_data->background.green,
             guac_client_data->background.blue,
             255);
+
 }
 
 void guac_rdp_glyph_enddraw(rdpContext* context,