[X2Go-Commits] nx-libs.git - build-main (branch) updated: nxcompshad/3.4.0-3

X2Go dev team git-admin at x2go.org
Fri Aug 30 16:22:20 CEST 2013


The branch, build-main has been updated
       via  c70adf725d3fea94eabdde467b8b8b106a796c0a (commit)
      from  2208f4f9ecf967579a364021f0847b3ad1d7777c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 nxcompshad/CHANGELOG       |   13 +++++++
 nxcompshad/Core.cpp        |    2 +-
 nxcompshad/Core.h          |    2 +-
 nxcompshad/Input.cpp       |    2 +-
 nxcompshad/Input.h         |    2 +-
 nxcompshad/LICENSE         |    2 +-
 nxcompshad/Logger.cpp      |    2 +-
 nxcompshad/Logger.h        |    2 +-
 nxcompshad/Makefile.in     |    2 +-
 nxcompshad/Manager.cpp     |    2 +-
 nxcompshad/Manager.h       |    2 +-
 nxcompshad/Misc.h          |    2 +-
 nxcompshad/Poller.h        |    2 +-
 nxcompshad/Regions.h       |    2 +-
 nxcompshad/Shadow.cpp      |    2 +-
 nxcompshad/Shadow.cpp.orig |    2 +-
 nxcompshad/Shadow.h        |    2 +-
 nxcompshad/Updater.cpp     |    2 +-
 nxcompshad/Updater.h       |    2 +-
 nxcompshad/Win.cpp         |    2 +-
 nxcompshad/Win.h           |    2 +-
 nxcompshad/X11.cpp         |   93 +++++++++++++++++++++++++++++++-------------
 nxcompshad/X11.h           |    2 +-
 23 files changed, 100 insertions(+), 48 deletions(-)

The diff of changes is:
diff --git a/nxcompshad/CHANGELOG b/nxcompshad/CHANGELOG
index 27bc0ac..ea1ff45 100644
--- a/nxcompshad/CHANGELOG
+++ b/nxcompshad/CHANGELOG
@@ -1,5 +1,18 @@
 ChangeLog:
 
+nxcompshad-3.4.0-3
+
+- Updated copyright to year 2010.
+
+nxcompshad-3.4.0-2
+
+- Fixed TR08G02256. Now the Shadow session is shown correctly with
+  MIT-SHM extension disabled.
+
+- Improved updateShadowFrameBuffer() and ~Poller() functions.
+
+- Avoided memory leak.
+
 nxcompshad-3.4.0-1
 
 - Opened the 3.4.0 branch based on nxcompshad-3.3.0-3.
diff --git a/nxcompshad/Core.cpp b/nxcompshad/Core.cpp
index 44327cd..6052de6 100644
--- a/nxcompshad/Core.cpp
+++ b/nxcompshad/Core.cpp
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Core.h b/nxcompshad/Core.h
index 17ce448..b0a9943 100644
--- a/nxcompshad/Core.h
+++ b/nxcompshad/Core.h
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Input.cpp b/nxcompshad/Input.cpp
index c51c5d3..09e77a8 100644
--- a/nxcompshad/Input.cpp
+++ b/nxcompshad/Input.cpp
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Input.h b/nxcompshad/Input.h
index 64775c2..764508e 100644
--- a/nxcompshad/Input.h
+++ b/nxcompshad/Input.h
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/LICENSE b/nxcompshad/LICENSE
index bf103c8..99d6e5c 100644
--- a/nxcompshad/LICENSE
+++ b/nxcompshad/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2001, 2009 NoMachine - http://www.nomachine.com/.
+Copyright (c) 2001, 2010 NoMachine - http://www.nomachine.com/.
 
 NXCOMPSHAD and NX extensions to X are copyright of NoMachine.
 
diff --git a/nxcompshad/Logger.cpp b/nxcompshad/Logger.cpp
index 1f55ce9..47e5e63 100644
--- a/nxcompshad/Logger.cpp
+++ b/nxcompshad/Logger.cpp
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com.          */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMP, NX protocol compression and NX extensions to this software     */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Logger.h b/nxcompshad/Logger.h
index 4eff83e..0a9cad9 100644
--- a/nxcompshad/Logger.h
+++ b/nxcompshad/Logger.h
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com.          */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMP, NX protocol compression and NX extensions to this software     */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in
index c7c22ad..eaf5cab 100755
--- a/nxcompshad/Makefile.in
+++ b/nxcompshad/Makefile.in
@@ -1,6 +1,6 @@
 ############################################################################
 #                                                                          #
-#  Copyright (c) 2001, 2005 NoMachine, http://www.nomachine.com.           #
+#  Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.          #
 #                                                                          #
 #  NXCOMP, NX protocol compression and NX extensions to this software      #
 #  are copyright of NoMachine. Redistribution and use of the present       #
diff --git a/nxcompshad/Manager.cpp b/nxcompshad/Manager.cpp
index 92a7cda..38b92c2 100644
--- a/nxcompshad/Manager.cpp
+++ b/nxcompshad/Manager.cpp
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Manager.h b/nxcompshad/Manager.h
index 22f6b15..6f87cdc 100644
--- a/nxcompshad/Manager.h
+++ b/nxcompshad/Manager.h
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Misc.h b/nxcompshad/Misc.h
index 6bfbaa4..3bcb266 100644
--- a/nxcompshad/Misc.h
+++ b/nxcompshad/Misc.h
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Poller.h b/nxcompshad/Poller.h
index 489ba30..914ba1d 100644
--- a/nxcompshad/Poller.h
+++ b/nxcompshad/Poller.h
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Regions.h b/nxcompshad/Regions.h
index 6e6827f..8ea41ad 100644
--- a/nxcompshad/Regions.h
+++ b/nxcompshad/Regions.h
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Shadow.cpp b/nxcompshad/Shadow.cpp
index e336ca6..6f2856c 100644
--- a/nxcompshad/Shadow.cpp
+++ b/nxcompshad/Shadow.cpp
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com.          */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Shadow.cpp.orig b/nxcompshad/Shadow.cpp.orig
index 91ef3b8..206eb2e 100644
--- a/nxcompshad/Shadow.cpp.orig
+++ b/nxcompshad/Shadow.cpp.orig
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com.          */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Shadow.h b/nxcompshad/Shadow.h
index 57a7725..ef65c0b 100644
--- a/nxcompshad/Shadow.h
+++ b/nxcompshad/Shadow.h
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com.          */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Updater.cpp b/nxcompshad/Updater.cpp
index 3f0e6a4..f1761ba 100644
--- a/nxcompshad/Updater.cpp
+++ b/nxcompshad/Updater.cpp
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Updater.h b/nxcompshad/Updater.h
index 386c726..4bcaa91 100644
--- a/nxcompshad/Updater.h
+++ b/nxcompshad/Updater.h
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Win.cpp b/nxcompshad/Win.cpp
index 87ea80b..3f1e489 100644
--- a/nxcompshad/Win.cpp
+++ b/nxcompshad/Win.cpp
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/Win.h b/nxcompshad/Win.h
index 9343821..72566b8 100644
--- a/nxcompshad/Win.h
+++ b/nxcompshad/Win.h
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
diff --git a/nxcompshad/X11.cpp b/nxcompshad/X11.cpp
index 837efad..cb8f55f 100644
--- a/nxcompshad/X11.cpp
+++ b/nxcompshad/X11.cpp
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */
@@ -127,7 +127,7 @@ Poller::~Poller()
     XCloseDisplay(display_);
   }
 
-  if (tmpBuffer_ != NULL && shmExtension_ == 1 && damageExtension_ == 1)
+  if (tmpBuffer_ != NULL && shmExtension_ != -1 && damageExtension_ == 1)
   {
     XFree(tmpBuffer_);
 
@@ -181,13 +181,21 @@ int Poller::updateShadowFrameBuffer(void)
 
       return -1;
     }
-
-    return 1;
   }
   else
   {
-    return 0;
+    image_ = XGetImage(display_, DefaultRootWindow(display_), 0, 0, width_,
+                           height_, AllPlanes, ZPixmap);
+
+    if (image_ == NULL)
+    {
+      logDebug("Poller::updateShadowFrameBuffer", "XGetImage failed!");
+
+      return -1;
+    }
   }
+
+  return 1;
 }
 
 char *Poller::getRect(XRectangle r)
@@ -255,6 +263,8 @@ char *Poller::getRect(XRectangle r)
     }
 
     XFree(image_);
+
+    image_ = NULL;
   }
 
   return tmpBuffer_;
@@ -1469,42 +1479,71 @@ void Poller::handleDamageNotify(XEvent *X)
 
 void Poller::updateDamagedAreas(void)
 {
-  if (shmExtension_ == 1)
-  {
-    BOX *boxPtr;
+  BOX *boxPtr;
 
-    XRectangle rectangle;
+  XRectangle rectangle;
 
-    int i;
-    int y;
+  int i;
+  int y;
+  
+  for (i = 0; i < lastUpdatedRegion_ -> numRects; i++)
+  {
+    boxPtr = lastUpdatedRegion_ -> rects + i;
 
-    for (i = 0; i < lastUpdatedRegion_ -> numRects; i++)
+    if (shmExtension_ == 1)
     {
-      boxPtr = lastUpdatedRegion_ -> rects + i;
-
       image_ -> width  = boxPtr -> x2 - boxPtr -> x1;
-      image_ -> height = boxPtr -> y2 - boxPtr -> y1; 
+      image_ -> height = boxPtr -> y2 - boxPtr -> y1;
+      image_ -> bytes_per_line =
+          ROUNDUP((image_ -> bits_per_pixel * image_ -> width),
+                      image_ -> bitmap_pad);
+      
+      if (XShmGetImage(display_, DefaultRootWindow(display_), image_,
+                           boxPtr -> x1, boxPtr -> y1, AllPlanes) == 0)
+      {
+        logDebug("Poller::updateDamagedAreas", "XShmGetImage failed!");
 
-      image_ -> bytes_per_line = ROUNDUP((image_ -> bits_per_pixel * image_ -> width), image_ -> bitmap_pad);
+        return;
+      }
+    }
+    else if (shmExtension_ == 0)
+    {
+      image_ = XGetImage(display_, DefaultRootWindow(display_), boxPtr -> x1,
+                             boxPtr -> y1, boxPtr -> x2 - boxPtr -> x1,
+                                 boxPtr -> y2 - boxPtr -> y1, AllPlanes,
+                                     ZPixmap);
 
-      if (XShmGetImage(display_, DefaultRootWindow(display_), image_, boxPtr -> x1, boxPtr -> y1, AllPlanes) == 0)
+      if (image_ == NULL)
       {
-        logDebug("Poller::getRect", "XShmGetImage failed!");
+        logDebug("Poller::updateDamagedAreas", "XGetImage failed!");
 
         return;
       }
 
-      rectangle.height = 1;
-      rectangle.width = image_ -> width;
-      rectangle.x = boxPtr -> x1;
-      rectangle.y = boxPtr -> y1;
+      image_ -> width  = boxPtr -> x2 - boxPtr -> x1;
+      image_ -> height = boxPtr -> y2 - boxPtr -> y1;
+      image_ -> bytes_per_line =
+          ROUNDUP((image_ -> bits_per_pixel * image_ -> width),
+                      image_ -> bitmap_pad);
+    }
+
+    rectangle.height = 1;
+    rectangle.width = image_ -> width;
+    rectangle.x = boxPtr -> x1;
+    rectangle.y = boxPtr -> y1;
 
-      for (y = 0; y < image_ -> height; y++)
-      {
-        update(image_ -> data + y * image_ -> bytes_per_line, rectangle);
+    for (y = 0; y < image_ -> height; y++)
+    {
+      update(image_ -> data + y * image_ -> bytes_per_line, rectangle);
 
-        rectangle.y++; 
-      }
+      rectangle.y++; 
+    }
+
+    if (shmExtension_ != 1)
+    {
+       XDestroyImage(image_);
+
+      image_ = NULL;
     }
   }
 
diff --git a/nxcompshad/X11.h b/nxcompshad/X11.h
index ff14aae..d34fd3d 100644
--- a/nxcompshad/X11.h
+++ b/nxcompshad/X11.h
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /*                                                                        */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/.         */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/.         */
 /*                                                                        */
 /* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
 /* are copyright of NoMachine. Redistribution and use of the present      */


hooks/post-receive
-- 
nx-libs.git (NX (redistributed))

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nx-libs.git" (NX (redistributed)).




More information about the x2go-commits mailing list