Skip to content

Commit e8ce50a

Browse files
Merge pull request #88 from benoit-pierre/fix_XGetImage/XPutImage
protocol/request: fix XGetImage/XPutImage support
2 parents c624bf9 + 61faba2 commit e8ce50a

6 files changed

Lines changed: 1284 additions & 1284 deletions

File tree

Xlib/protocol/request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ class PutImage(rq.Request):
10661066
rq.Card8('left_pad'),
10671067
rq.Card8('depth'),
10681068
rq.Pad(2),
1069-
rq.String8('data'),
1069+
rq.Binary('data'),
10701070
)
10711071

10721072
class GetImage(rq.ReplyRequest):
@@ -1089,7 +1089,7 @@ class GetImage(rq.ReplyRequest):
10891089
rq.ReplyLength(),
10901090
rq.Card32('visual'),
10911091
rq.Pad(20),
1092-
rq.String8('data'),
1092+
rq.Binary('data'),
10931093
)
10941094

10951095
class PolyText8(rq.Request):

test/gen/genprottest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ def rand(x, rmin = rmin, rmax = rmax):
585585
#
586586
# byte-char string
587587
#
588-
elif isinstance(f, rq.String8):
588+
elif isinstance(f, (rq.String8, rq.Binary)):
589589
vfstr = vardefs[i]
590590
vflen = len(vfstr)
591591

@@ -933,7 +933,7 @@ def build_bin(bin):
933933
'FillPoly': (('Point', 3), ),
934934
'PolyFillRectangle': (('Rectangle', 2), ),
935935
'PolyFillArc': (('Arc', 1), ),
936-
'PutImage': ('bit map data', ),
936+
'PutImage': (b'\xe9\x10\xf2o\x7f{\xae-\xe6\x18\xce\x83', ),
937937
'ImageText8': ('showme', ),
938938
'ImageText16': ('showmore', ),
939939
'AllocNamedColor': ('octarin', ),
@@ -967,7 +967,7 @@ def build_bin(bin):
967967
'ListFontsWithInfo': (('FontProp', 1), 'fontfont'),
968968
'GetFontPath': [(['path1', 'path2232'], ),
969969
([], ) ],
970-
'GetImage': ('this is real ly imag e b-map', ),
970+
'GetImage': (b'\xeb?:\xa7\xc6\x8b\xc2\x96o-S\xe6\xd6z6\x94\xd7v\xd2R.\xa2\xeaw\t\x13\x95\x85',),
971971
'ListInstalledColormaps': (2, ),
972972
'AllocColorCells': [(17, 3),
973973
(0, 0) ],

test/test_events_be.py

100644100755
File mode changed.

0 commit comments

Comments
 (0)