xfixes: clean up request handling
Compare changes
Files
3- Enrico Weigelt, metux IT consult . authored
Canonicalize all reply structs onto stack allocation and static initialization, like already done in most other extension. So make the code easier to understand and allow further simplifications by subsequent commits (we can then use generic macros for doing the actual sending, as well as byteorder swapping, size computation, etc), Also gaining a little bit efficiency by skipping some heap allocations. Dynamically sized payload buffers (where the upper bound isn't known), are still allocated on heap. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net>
+ 83
− 98
@@ -229,11 +229,10 @@ XFixesSelectCursorInput(ClientPtr pClient, WindowPtr pWindow, CARD32 eventMask)
@@ -302,7 +301,7 @@ SProcXFixesSelectCursorInput(ClientPtr client)
@@ -361,9 +360,7 @@ int
@@ -378,49 +375,44 @@ ProcXFixesGetCursorImage(ClientPtr client)
@@ -448,16 +440,15 @@ SProcXFixesSetCursorName(ClientPtr client)
@@ -469,7 +460,7 @@ ProcXFixesGetCursorName(ClientPtr client)
@@ -477,12 +468,12 @@ ProcXFixesGetCursorName(ClientPtr client)
@@ -494,19 +485,17 @@ SProcXFixesGetCursorName(ClientPtr client)
@@ -524,55 +513,51 @@ ProcXFixesGetCursorImageAndName(ClientPtr client)
@@ -699,7 +684,7 @@ SProcXFixesChangeCursor(ClientPtr client)
@@ -736,7 +721,7 @@ SProcXFixesChangeCursorByName(ClientPtr client)
@@ -892,7 +877,7 @@ SProcXFixesHideCursor(ClientPtr client)
@@ -940,7 +925,7 @@ SProcXFixesShowCursor(ClientPtr client)
@@ -1026,7 +1011,7 @@ SProcXFixesCreatePointerBarrier(ClientPtr client)
@@ -1045,7 +1030,7 @@ SProcXFixesDestroyPointerBarrier(ClientPtr client)