Skip Menu |

This queue is for tickets about the X11-Protocol CPAN distribution.

Report information
The Basics
Id: 40234
Status: open
Priority: 0/
Queue: X11-Protocol

People
Owner: SMCCAM [...] cpan.org
Requestors: rbeasley [...] vmware.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.03
Fixed in: (no value)



Subject: Gravity constants incorrect, do not match X11/X.h.
Date: Tue, 21 Oct 2008 12:06:15 -0700
To: bug-X11-Protocol [...] rt.cpan.org
From: Ryan Beasley <rbeasley [...] vmware.com>
X11-Protocol-0.53 This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi. Ubuntu 8.04.1 Server/amd64 :: Linux localhost 2.6.24-19-server #1 SMP Wed Jun 18 14:44:47 UTC 2008 x86_64 GNU/Linux I don't think gravity constants defined in X11/Protocol/Constants.pm are correct. Er, at least they don't match the values found in X11/X.h. Example: X11/X.h: Show quoted text
> #define ForgetGravity 0 > #define NorthWestGravity 1 > #define NorthGravity 2 > #define NorthEastGravity 3 > #define WestGravity 4 > #define CenterGravity 5 > #define EastGravity 6 > #define SouthWestGravity 7 > #define SouthGravity 8 > #define SouthEastGravity 9 > #define StaticGravity 10
Constants.pm: Show quoted text
> sub ForgetGravity () { 0 } > sub UnmapGravity () { 0 } > sub StaticGravity () { 1 } > sub NorthWestGravity () { 2 } > sub NorthGravity () { 3 } > sub NorthEastGravity () { 4 } > sub WestGravity () { 5 } > sub CenterGravity () { 6 } > sub EastGravity () { 7 } > sub SouthWestGravity () { 8 } > sub SouthGravity () { 9 } > sub SouthEastGravity () { 10 }
Rough patch to fix this is attached. TIA! -- Ryan Beasley <rbeasley@vmware.com>
--- Constants.pm.orig 2008-10-21 11:42:05.000155000 -0700 +++ Constants.pm 2008-10-21 11:49:00.000572000 -0700 @@ -379,32 +379,34 @@ sub DirectColor () { 5 } sub DirectColour () { 5 } -# (Bit|Win)Gravity +# Bit Gravity +sub ForgetGravity () { 0 } +sub NorthWestGravity () { 1 } +sub NorthGravity () { 2 } +sub NorthEastGravity () { 3 } +sub WestGravity () { 4 } +sub CenterGravity () { 5 } +sub EastGravity () { 6 } +sub SouthWestGravity () { 7 } +sub SouthGravity () { 8 } +sub SouthEastGravity () { 9 } +sub StaticGravity () { 10 } + sub Forget () { 0 } -sub Unmap () { 0 } -sub Static () { 1 } -sub NorthWest () { 2 } -sub North () { 3 } -sub NorthEast () { 4 } -sub West () { 5 } -sub Center () { 6 } -sub East () { 7 } -sub SouthWest () { 8 } -sub South () { 9 } -sub SouthEast () { 10 } +sub NorthWest () { 1 } +sub North () { 2 } +sub NorthEast () { 3 } +sub West () { 4 } +sub Center () { 5 } +sub East () { 6 } +sub SouthWest () { 7 } +sub South () { 8 } +sub SouthEast () { 9 } +sub Static () { 10 } -sub ForgetGravity () { 0 } +# Window gravity + bit gravity above sub UnmapGravity () { 0 } -sub StaticGravity () { 1 } -sub NorthWestGravity () { 2 } -sub NorthGravity () { 3 } -sub NorthEastGravity () { 4 } -sub WestGravity () { 5 } -sub CenterGravity () { 6 } -sub EastGravity () { 7 } -sub SouthWestGravity () { 8 } -sub SouthGravity () { 9 } -sub SouthEastGravity () { 10 } +sub Unmap () { 0 } # EventMask sub KeyPress_m () { 1 }
Subject: Re: [rt.cpan.org #40234] Gravity constants incorrect, do not match X11/X.h.
Date: Tue, 21 Oct 2008 12:19:21 -0700
To: "bug-X11-Protocol [...] rt.cpan.org" <bug-X11-Protocol [...] rt.cpan.org>
From: Ryan Beasley <rbeasley [...] vmware.com>
Bugs in X11-Protocol via RT wrote: Show quoted text
> X11-Protocol-0.53
Whoops. I lied. I'm running the current version, X11-Protocol-0.56. -- Ryan Beasley <rbeasley@vmware.com>
On Tue Oct 21 15:06:32 2008, rbeasley@vmware.com wrote: Show quoted text
> X11-Protocol-0.53 > This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi. > Ubuntu 8.04.1 Server/amd64 :: Linux localhost 2.6.24-19-server #1 SMP > Wed Jun 18 > 14:44:47 UTC 2008 x86_64 GNU/Linux > > I don't think gravity constants defined in X11/Protocol/Constants.pm > are > correct. Er, at least they don't match the values found in X11/X.h.
Yup. They also don't match the protocol spec document, which is where they should have been copied from, so they're definitely wrong. The problem affects the %Const hash definition in Protocol.pm too, which is probably where the mistake started.