[X2Go-Commits] [nx-libs] 243/429: NXproperty.c: reorder functions

git-admin at x2go.org git-admin at x2go.org
Mon Oct 18 09:36:42 CEST 2021


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 82028465cd5b92ad7c5bffd6333ee57e13ce8045
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Sun Jan 31 19:20:25 2021 +0100

    NXproperty.c: reorder functions
    
    Make it obvious that GetWindowProperty() and ChangeWindowProperty are
    not derived from dix.
---
 nx-X11/programs/Xserver/hw/nxagent/NXproperty.c | 60 +++++++++++++------------
 1 file changed, 31 insertions(+), 29 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
index 7cf41f241..8461f4a30 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
@@ -208,28 +208,6 @@ ProcChangeProperty(ClientPtr client)
     }
 }
 
-int
-ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, 
-                     int mode, unsigned long len, void * value, 
-                     Bool sendevent)
-{
-    int sizeInBytes = format>>3;
-    int totalSize = len * sizeInBytes;
-    int copySize = nxagentOption(CopyBufferSize);
-
-    if (copySize != COPY_UNLIMITED && property == clientCutProperty)
-    {
-      if (totalSize > copySize)
-      {
-        totalSize = copySize;
-        totalSize = totalSize - (totalSize % sizeInBytes);
-        len = totalSize / sizeInBytes;
-      }
-    }
-
-    return xorg_ChangeWindowProperty(pWin, property, type, format, mode, len, value, sendevent);
-}
-
 /*****************
  * GetProperty
  *    If type Any is specified, returns the property from the specified
@@ -443,6 +421,20 @@ ProcGetProperty(ClientPtr client)
     return(client->noClientException);
 }
 
+int
+ProcDeleteProperty(register ClientPtr client)
+{
+    REQUEST(xDeletePropertyReq);
+    REQUEST_SIZE_MATCH(xDeletePropertyReq);
+    /* prevent clients from deleting the NX_AGENT_VERSION property */
+    if (stuff->property == MakeAtom("NX_AGENT_VERSION", strlen("NX_AGENT_VERSION"), True))
+      return client->noClientException;
+
+    return xorg_ProcDeleteProperty(client);
+}
+
+/* ---------------------------------------------------------------------- */
+
 /*
  * GetWindowProperty is the internal implementation of the
  * XGetWindowProperty() Xlib call. It is called from
@@ -572,13 +564,23 @@ GetWindowProperty(WindowPtr pWin, Atom property, long longOffset,
 }
 
 int
-ProcDeleteProperty(register ClientPtr client)
+ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
+                     int mode, unsigned long len, void * value,
+                     Bool sendevent)
 {
-    REQUEST(xDeletePropertyReq);
-    REQUEST_SIZE_MATCH(xDeletePropertyReq);
-    /* prevent clients from deleting the NX_AGENT_VERSION property */
-    if (stuff->property == MakeAtom("NX_AGENT_VERSION", strlen("NX_AGENT_VERSION"), True))
-      return client->noClientException;
+    int sizeInBytes = format>>3;
+    int totalSize = len * sizeInBytes;
+    int copySize = nxagentOption(CopyBufferSize);
 
-    return xorg_ProcDeleteProperty(client);
+    if (copySize != COPY_UNLIMITED && property == clientCutProperty)
+    {
+      if (totalSize > copySize)
+      {
+        totalSize = copySize;
+        totalSize = totalSize - (totalSize % sizeInBytes);
+        len = totalSize / sizeInBytes;
+      }
+    }
+
+    return xorg_ChangeWindowProperty(pWin, property, type, format, mode, len, value, sendevent);
 }

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list