+static bool handle_sequence(struct connstate *connstate, uint16_t sequence) {
+ /* BEGIN RandR 1.5 specific */
+ if (sequence == connstate->getmonitors) {
+ printf("RRGetMonitors reply!\n");
+ if (getmonitors_reply.buf != NULL) {
+ printf("injecting reply\n");
+ ((generic_x11_reply_t *)getmonitors_reply.buf)->sequence = sequence;
+ must_write(writeall(connstate->clientw->fd, getmonitors_reply.buf, getmonitors_reply.len));
+ return true;
+ }
+ }
+
+ if (sequence == connstate->getoutputinfo) {
+ printf("RRGetOutputInfo reply!\n");
+ if (getoutputinfo_reply.buf != NULL) {
+ printf("injecting reply\n");
+ ((generic_x11_reply_t *)getoutputinfo_reply.buf)->sequence = sequence;
+ must_write(writeall(connstate->clientw->fd, getoutputinfo_reply.buf, getoutputinfo_reply.len));
+ return true;
+ }
+ }
+ /* END RandR 1.5 specific */
+
+ return false;
+}
+