Skip to content

Commit c53a13f

Browse files
yut23vasily-v-ryabov
authored andcommitted
Fix screensaver protocol mismatch
The protocol encoding specified in the X11 documentation differs from the actual XCB protocol that Xorg uses. This makes `query_version()` report the wrong version and `query_info()` fail by trying to unpack too many bytes.
1 parent e8cf018 commit c53a13f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Xlib/ext/screensaver.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ class QueryVersion(rq.ReplyRequest):
6464
rq.Pad(1),
6565
rq.Card16('sequence_number'),
6666
rq.ReplyLength(),
67-
rq.Card8('major_version'),
68-
rq.Card8('minor_version'),
69-
rq.Pad(22),
67+
rq.Card16('major_version'),
68+
rq.Card16('minor_version'),
69+
rq.Pad(20),
7070
)
7171

7272
def query_version(self):
@@ -94,7 +94,7 @@ class QueryInfo(rq.ReplyRequest):
9494
rq.Card32('idle'),
9595
rq.Card32('event_mask'), # rq.Set('event_mask', 4, (NotifyMask, CycleMask)),
9696
rq.Card8('kind'),
97-
rq.Pad(10),
97+
rq.Pad(7),
9898
)
9999

100100
def query_info(self):

0 commit comments

Comments
 (0)