aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/CreateGC.cpp
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-04-19 10:47:43 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-04-19 10:47:43 +0200
commit03b65211260ff757b35a367f8936fd5e882ce56c (patch)
tree014155ca365a93687f99ea6492dd2c9d3e80593e /nxcomp/CreateGC.cpp
parent2ffe52c5ecb7cf6af111c685eee7f8fcfd1139a9 (diff)
parent5c495241069708e9b1bbf6e57fd49599be540b63 (diff)
downloadnx-libs-03b65211260ff757b35a367f8936fd5e882ce56c.tar.gz
nx-libs-03b65211260ff757b35a367f8936fd5e882ce56c.tar.bz2
nx-libs-03b65211260ff757b35a367f8936fd5e882ce56c.zip
Merge branch 'fcarvajaldev-3.6.x-remove-old-proto-compat' into 3.6.x
Diffstat (limited to 'nxcomp/CreateGC.cpp')
-rw-r--r--nxcomp/CreateGC.cpp80
1 files changed, 18 insertions, 62 deletions
diff --git a/nxcomp/CreateGC.cpp b/nxcomp/CreateGC.cpp
index f1c10e69b..fab8bba10 100644
--- a/nxcomp/CreateGC.cpp
+++ b/nxcomp/CreateGC.cpp
@@ -146,39 +146,17 @@ void CreateGCStore::updateIdentity(EncodeBuffer &encodeBuffer, const Message *me
ClientCache *clientCache = (ClientCache *) channelCache;
- if (control -> isProtoStep7() == 1)
- {
- #ifdef TEST
- *logofs << name() << ": Encoding value " << createGC -> gcontext
- << " as gcontext field.\n" << logofs_flush;
- #endif
-
- encodeBuffer.encodeNewXidValue(createGC -> gcontext, clientCache -> lastId,
- clientCache -> lastIdCache, clientCache -> gcCache,
- clientCache -> freeGCCache);
-
- cachedCreateGC -> gcontext = createGC -> gcontext;
- }
- else
- {
- #ifdef TEST
- *logofs << name() << ": Encoding value " << createGC -> drawable
- << " as drawable field.\n" << logofs_flush;
- #endif
-
- encodeBuffer.encodeXidValue(createGC -> drawable, clientCache -> drawableCache);
-
- cachedCreateGC -> drawable = createGC -> drawable;
-
- #ifdef TEST
- *logofs << name() << ": Encoding value " << createGC -> gcontext
- << " as gcontext field.\n" << logofs_flush;
- #endif
+ // Since ProtoStep7 (#issue 108)
+ #ifdef TEST
+ *logofs << name() << ": Encoding value " << createGC -> gcontext
+ << " as gcontext field.\n" << logofs_flush;
+ #endif
- encodeBuffer.encodeXidValue(createGC -> gcontext, clientCache -> gcCache);
+ encodeBuffer.encodeNewXidValue(createGC -> gcontext, clientCache -> lastId,
+ clientCache -> lastIdCache, clientCache -> gcCache,
+ clientCache -> freeGCCache);
- cachedCreateGC -> gcontext = createGC -> gcontext;
- }
+ cachedCreateGC -> gcontext = createGC -> gcontext;
}
void CreateGCStore::updateIdentity(DecodeBuffer &decodeBuffer, const Message *message,
@@ -190,37 +168,15 @@ void CreateGCStore::updateIdentity(DecodeBuffer &decodeBuffer, const Message *me
unsigned int value;
- if (control -> isProtoStep7() == 1)
- {
- decodeBuffer.decodeNewXidValue(value, clientCache -> lastId,
- clientCache -> lastIdCache, clientCache -> gcCache,
- clientCache -> freeGCCache);
+ // Since ProtoStep7 (#issue 108)
+ decodeBuffer.decodeNewXidValue(value, clientCache -> lastId,
+ clientCache -> lastIdCache, clientCache -> gcCache,
+ clientCache -> freeGCCache);
- createGC -> gcontext = value;
+ createGC -> gcontext = value;
- #ifdef TEST
- *logofs << name() << ": Decoded value " << createGC -> gcontext
- << " as gcontext field.\n" << logofs_flush;
- #endif
- }
- else
- {
- decodeBuffer.decodeXidValue(value, clientCache -> drawableCache);
-
- createGC -> drawable = value;
-
- #ifdef TEST
- *logofs << name() << ": Decoded value " << createGC -> drawable
- << " as drawable field.\n" << logofs_flush;
- #endif
-
- decodeBuffer.decodeXidValue(value, clientCache -> gcCache);
-
- createGC -> gcontext = value;
-
- #ifdef TEST
- *logofs << name() << ": Decoded value " << createGC -> gcontext
- << " as gcontext field.\n" << logofs_flush;
- #endif
- }
+ #ifdef TEST
+ *logofs << name() << ": Decoded value " << createGC -> gcontext
+ << " as gcontext field.\n" << logofs_flush;
+ #endif
}