[PATCH:xscope 00/24] Clean up & build up to adding RANDR 1.4 support

Alan Coopersmith alan.coopersmith at oracle.com
Fri Aug 31 22:17:42 PDT 2012


Sure I thought, it will be easy to update the RANDR support in xscope to the
new version 1.4 - it's almost there, right?

Nope, turns out xscope's RANDR support was still 0.x only - no 1.0 or later.
And around every corner trying to get to 1.4 was something else to fix first.

24 commits later and I think we're close, though since the randr app & 
Xserver only enable 1.3 protocol, I can't fully test it.

This is also posted to 
     http://cgit.freedesktop.org/~alanc/xscope
     git://people.freedesktop.org/~alanc/xscope

Note if you try applying the patches yourself, you'll need at least a new
enough git to have the big reindentation patch I pushed a while ago.

Some snippets of output from RANDR versions I can decode now:

                                         ..............REPLY: RandrReply
                                                  RANDRREPLY: GetScreenResources
                                                   timestamp: TIM a6e81cd2
                                            config-timestamp: TIM a6e822a0
                                                       crtcs: (1)
                                                     outputs: (1)
                                                   modeinfos: (13)
                                                   mode name: "640x480"
                                                   mode name: "800x600"
                                                   mode name: "1024x768"
                                                   mode name: "1152x900"
                                                   mode name: "1280x1024"
                                                   mode name: "1280x800"
                                                   mode name: "1400x1050"
                                                   mode name: "1440x900"
                                                   mode name: "1600x1024"
                                                   mode name: "1600x1200"
                                                   mode name: "1680x1050"
                                                   mode name: "1920x1080"
                                                   mode name: "1920x1200"

 1.74: Client 3 -->   12 bytes
         ............REQUEST: RandrRequest
                RANDRREQUEST: RandrGetCrtcInfo
                        crtc: CRTC 0000004c
            config-timestamp: TIM a6e822a0
 1.74:                                    40 bytes <-- X11 Server 3
                                         ..............REPLY: RandrReply
                                                  RANDRREPLY: GetCrtcInfo
                                                      status: 00
                                                   timestamp: TIM a6e81cd2
                                                           x: 0
                                                           y: 0
                                                       width: 0780
                                                      height: 04b0
                                                        mode: MODE 0000005a
                                        current rotation and reflection: Rotate_0
                                        set of possible rotations: Rotate_0 | Rotate_90 | Rotate_180 | Rotate_270
                                           number of outputs: 0001
                                        number of possible outputs: 0001
                                                     outputs: (1)
                                            possible outputs: (1)

 1.74: Client 3 -->   12 bytes
         ............REQUEST: RandrRequest
                RANDRREQUEST: RandrGetOutputInfo
                      output: OUTP 0000004d
            config-timestamp: TIM a6e822a0
 1.74:                                   100 bytes <-- X11 Server 3
                                         ..............REPLY: RandrReply
                                                  RANDRREPLY: GetOutputInfo
                                                      status: 00
                                                   timestamp: TIM a6e81cd2
                                                        crtc: CRTC 0000004c
                                        width-in-millimeters: 00000000
                                        height-in-millimeters: 00000000
                                                  connection: 00
                                              subpixel-order: Unknown
                                                       crtcs: (1)
                                                 other-modes: (13)
                                                        name: "default"

Alan Coopersmith (24):
  Use local variable for ioctl argument instead of a static
  Combine usage message into single string for fprintf
  Define *HEADER constants as string pointers, not arrays
  Convert some for loops to use C99-style inline variable declarations
  Move debug statement before panic() call, so it can actually run
  SaveBytes: drop unnecessary casts in bcopy() call
  Convert remaining sprintf calls to snprintf
  Add _X_NORETURN to additional functions suggested by gcc warnings
  Convert remaining bcopy() calls to memcpy()
  Convert ILong, IShort, etal to return C99 uint*_t types
  Move ILong, IShort, etal to inline functions in x11.h
  ILong: shift each byte individually, then OR them together
  Handle big-requests when calculating request contents from length
    field
  Convert ValueRec structures from unsigned long to uint32_t values
  Record atoms from InternAtom and GetAtomName requests
  Create PrintPropertyValues function for property requests
  Print UTF8_STRING properties as text if locale uses UTF-8 charset
  Add support for printing more types of property value
  Add -I command line flag to enter interactive mode at startup
  When Verbose == 0, don't print number of data items in unknown reply
    types
  Refactor fd closing into CloseFD helper function
  Add experimental support for reading a previously recorded file
  Refactor error printing to use common functions
  Update RANDR support from 0.x to include 1.0 - 1.4

 COPYING         |    3 +-
 common.c        |   14 +-
 configure.ac    |    2 +-
 decode11.c      |   14 +-
 decode_glx.c    |    3 +-
 decode_randr.c  |  465 +++++++++++++++++-
 decode_render.c |   41 +-
 extensions.h    |    3 +
 fd.c            |   42 +-
 fd.h            |    1 +
 man/xscope.man  |   14 +-
 print11.c       |  338 +++++++------
 print_randr.c   | 1477 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 print_render.c  |   47 +-
 proto.h         |    5 +
 prtype.c        |  165 ++++---
 randrscope.h    |  110 ++++-
 scope.c         |  421 ++++++++++++++--
 scope.h         |    6 +-
 server.c        |   63 +--
 table11.c       |   72 ++-
 x11.h           |  117 ++++-
 22 files changed, 2959 insertions(+), 464 deletions(-)

-- 
1.7.9.2



More information about the xorg-devel mailing list