[X2Go-Commits] [nx-libs] 14/24: Fix repainting of SolidFill pictures with libcairo > 1.12.x (204_nxagent_repaint-solidpict.full.patch).

git-admin at x2go.org git-admin at x2go.org
Tue Feb 10 21:50:55 CET 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit db870556433fd737640f7038e0583242724e2d52
Author: Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
Date:   Tue Feb 10 19:29:53 2015 +0100

    Fix repainting of SolidFill pictures with libcairo > 1.12.x (204_nxagent_repaint-solidpict.full.patch).
---
 .../204_nxagent_repaint-solidpict.full.patch       |   53 --------------------
 debian/patches/series                              |    1 -
 nx-X11/programs/Xserver/hw/nxagent/Render.c        |   16 ++++--
 nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c   |    4 ++
 .../programs/Xserver/hw/nxagent/X/NXpicturestr.h   |    1 +
 5 files changed, 16 insertions(+), 59 deletions(-)

diff --git a/debian/patches/204_nxagent_repaint-solidpict.full.patch b/debian/patches/204_nxagent_repaint-solidpict.full.patch
deleted file mode 100644
index 139a46a..0000000
--- a/debian/patches/204_nxagent_repaint-solidpict.full.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Description: Fix repainting of SolidFill pictures with libcairo > 1.12.x
-Author: Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
-diff -rupN a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c
---- a/nx-X11/programs/Xserver/hw/nxagent/Render.c	2012-05-16 18:05:07.000000000 +0200
-+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c	2012-09-20 20:53:37.893459269 +0200
-@@ -2689,11 +2689,17 @@ void nxagentReconnectPicture(pointer p0,
-     #endif
-   }
- 
--  if (!pForm)
-+  if (!pForm && pPicture->pSourcePict)
-   {
--    *pBool = False;
--
--    return;
-+        /*possible we need to add support for other picture types, for example gradients...*/
-+        switch(pPicture->pSourcePict->type)
-+        {
-+        case SourcePictTypeSolidFill:
-+            nxagentPicturePriv(pPicture) -> picture = XRenderCreateSolidFill(nxagentDisplay,
-+                    (const XRenderColor*) &pPicture->pSourcePict->solidFill.fullColor);
-+            break;
-+        }
-+        return;
-   }
- 
-   #ifdef TEST
-diff -rupN a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c
---- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c	2010-11-11 21:18:00.000000000 +0100
-+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c	2012-09-20 20:54:50.209817849 +0200
-@@ -1137,6 +1137,10 @@ CreateSolidPicture (Picture pid, xRender
-     }
-     pPicture->pSourcePict->type = SourcePictTypeSolidFill;
-     pPicture->pSourcePict->solidFill.color = xRenderColorToCard32(*color);
-+    pPicture->pSourcePict->solidFill.fullColor.alpha=color->alpha;
-+    pPicture->pSourcePict->solidFill.fullColor.red=color->red;
-+    pPicture->pSourcePict->solidFill.fullColor.green=color->green;
-+    pPicture->pSourcePict->solidFill.fullColor.blue=color->blue;
-     return pPicture;
- }
- 
-diff -rupN a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h
---- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h	2010-10-22 16:04:24.000000000 +0200
-+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h	2012-09-20 20:55:31.106020653 +0200
-@@ -95,6 +95,7 @@ typedef struct _PictTransform {
- typedef struct _PictSolidFill {
-     unsigned int type;
-     CARD32 color;
-+    xRenderColor fullColor;
- } PictSolidFill, *PictSolidFillPtr;
- 
- typedef struct _PictGradientStop {
-
diff --git a/debian/patches/series b/debian/patches/series
index 424c3e9..82d5eb9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
-204_nxagent_repaint-solidpict.full.patch
 205_nxagent_refresh-adsl.full.patch
 206_nxagent_clipboard-as-nxoption.full.patch
 207_nxagent_fix-xfixes-selection.full.patch
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c
index 29bffaa..41a1ec0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Render.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c
@@ -2689,11 +2689,17 @@ void nxagentReconnectPicture(pointer p0, XID x1, void *p2)
     #endif
   }
 
-  if (!pForm)
-  {
-    *pBool = False;
-
-    return;
+  if (!pForm && pPicture->pSourcePict)
+  {
+        /*possible we need to add support for other picture types, for example gradients...*/
+        switch(pPicture->pSourcePict->type)
+        {
+        case SourcePictTypeSolidFill:
+            nxagentPicturePriv(pPicture) -> picture = XRenderCreateSolidFill(nxagentDisplay,
+                    (const XRenderColor*) &pPicture->pSourcePict->solidFill.fullColor);
+            break;
+        }
+        return;
   }
 
   #ifdef TEST
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c
index d9054b4..4b342eb 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicture.c
@@ -1137,6 +1137,10 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error)
     }
     pPicture->pSourcePict->type = SourcePictTypeSolidFill;
     pPicture->pSourcePict->solidFill.color = xRenderColorToCard32(*color);
+    pPicture->pSourcePict->solidFill.fullColor.alpha=color->alpha;
+    pPicture->pSourcePict->solidFill.fullColor.red=color->red;
+    pPicture->pSourcePict->solidFill.fullColor.green=color->green;
+    pPicture->pSourcePict->solidFill.fullColor.blue=color->blue;
     return pPicture;
 }
 
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h
index 0d1a8e1..b267925 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXpicturestr.h
@@ -95,6 +95,7 @@ typedef struct _PictTransform {
 typedef struct _PictSolidFill {
     unsigned int type;
     CARD32 color;
+    xRenderColor fullColor;
 } PictSolidFill, *PictSolidFillPtr;
 
 typedef struct _PictGradientStop {

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list