diff --git a/lib/modules/Protocols.pmod/X.pmod/Requests.pmod b/lib/modules/Protocols.pmod/X.pmod/Requests.pmod
index 0c1374a787920f7a8126f4c25de2b194abf1efa9..792fbc38fd41a8ebcd11b451a805a73e3e9a12f4 100644
--- a/lib/modules/Protocols.pmod/X.pmod/Requests.pmod
+++ b/lib/modules/Protocols.pmod/X.pmod/Requests.pmod
@@ -598,8 +598,8 @@ class PutImage
 
   string to_string()
   {
-    werror(sprintf("PutImage>to_string: %d, %d, %d, %d\n",
-		   dst_x, dst_y, width, height));
+    //    werror(sprintf("PutImage>to_string: %d, %d, %d, %d\n",
+    //		   dst_x, dst_y, width, height));
     string pad="";
     while(((strlen(data)+strlen(pad))%4)) pad += "\0";
     pad =  build_request(sprintf("%4c" "%4c"
@@ -661,6 +661,27 @@ class AllocColor
   }
 }
 
+class CreatePixmap
+{
+  inherit request;
+  constant reqType = 53;
+
+  int depth;
+  
+  int pid;
+  int drawable;
+
+  int width, height;
+
+  string to_string()
+  {
+    return build_request
+      (sprintf("%4c%4c" "%2c%2c",
+		      pid, drawable,
+		      width, height), depth);
+  }
+}
+
 class QueryExtension
 {
   inherit request;
@@ -729,7 +750,7 @@ class ExtensionRequest
 
   // End preamble..
 
-  varargs void create( int m, function reply_handler, function error_handler )
+  void create( int|void m, function|void reply_handler, function|void error_handler )
   {
     type = m;
     handle_reply = reply_handler;
diff --git a/lib/modules/Protocols.pmod/X.pmod/Types.pmod b/lib/modules/Protocols.pmod/X.pmod/Types.pmod
index 744797171fade1a6e470befb102feca6ab10e02a..c04465f74cff5d8f3c0f83854578641db3ddb330 100644
--- a/lib/modules/Protocols.pmod/X.pmod/Types.pmod
+++ b/lib/modules/Protocols.pmod/X.pmod/Types.pmod
@@ -160,6 +160,26 @@ class Drawable
     return GC(display, req->gc);
   }
 
+  object CreatePixmap_req(int width, int height, int depth)
+  {
+    object req = Requests.CreatePixmap();
+
+    req->pid = display->alloc_id();
+    req->drawable = id;
+    req->width = width;
+    req->height = height;
+    req->depth = depth;
+    return req;
+  }
+
+  object CreatePixmap(int width, int height, int depth)
+  {
+    object req = CreatePixmap_req(width, height, depth);
+    display->send_request(req);
+    
+    return Pixmap(display, req->pid, this_object());
+  }
+
   object FillPoly_req(int gc, int shape, int coordMode, array(object) p)
   {
     object req = Requests.FillPoly();
@@ -224,16 +244,27 @@ class Drawable
   }
   
   void PutImage(object gc, int depth,
-		int tx, int ty, int width, int height, string data)
+		int tx, int ty, int width, int height, string data,
+		int|void format)
   {
-    display->send_request(PutImage_req(gc, depth, tx, ty,
-				       width, height, data));
+    object req = PutImage_req(gc, depth, tx, ty, width, height, data);
+    req->format = format;
+    display->send_request(req);
   }
 }
 
 class Pixmap
 {
   inherit Drawable;
+
+  object parent;
+
+  // Init function.
+  void create(mixed ... args)
+  {
+    ::create( @args );
+    if(sizeof(args)>2 && objectp(args[2]))  parent = args[2];
+  }
 }
 
 class Window