diff options
| author | Andrew Gallant <jamslam@gmail.com> | 2013-12-28 10:02:18 -0500 | 
|---|---|---|
| committer | Přemysl Janouch <p@janouch.name> | 2018-09-08 16:49:21 +0200 | 
| commit | 33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230 (patch) | |
| tree | ce7d66adcb2e7fd3802a884b0fae618dfa1533a6 /nexgb/randr | |
| parent | ad9c35a02f190ea5da59c9c4a3aeddcf7e8a5c1f (diff) | |
| download | haven-33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230.tar.gz haven-33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230.tar.xz haven-33509dbeb0acd7abbbb9e8c434d0c3f0ce8a3230.zip | |
It appears that the "Str" type (which is built into the core X protocol)
doesn't specify any padding. So it has to be treated as a special case.
Close #12.
Diffstat (limited to 'nexgb/randr')
| -rw-r--r-- | nexgb/randr/randr.go | 24 | 
1 files changed, 12 insertions, 12 deletions
| diff --git a/nexgb/randr/randr.go b/nexgb/randr/randr.go index c7df090..c7893e3 100644 --- a/nexgb/randr/randr.go +++ b/nexgb/randr/randr.go @@ -504,6 +504,15 @@ func ModeInfoListBytes(buf []byte, list []ModeInfo) int {  	return xgb.Pad(b)  } +const ( +	NotifyCrtcChange       = 0 +	NotifyOutputChange     = 1 +	NotifyOutputProperty   = 2 +	NotifyProviderChange   = 3 +	NotifyProviderProperty = 4 +	NotifyResourceChange   = 5 +) +  // Notify is the event number for a NotifyEvent.  const Notify = 1 @@ -572,15 +581,6 @@ func init() {  	xgb.NewExtEventFuncs["RANDR"][1] = NotifyEventNew  } -const ( -	NotifyCrtcChange       = 0 -	NotifyOutputChange     = 1 -	NotifyOutputProperty   = 2 -	NotifyProviderChange   = 3 -	NotifyProviderProperty = 4 -	NotifyResourceChange   = 5 -) -  // NotifyDataUnion is a represention of the NotifyDataUnion union type.  // Note that to *create* a Union, you should *never* create  // this struct directly (unless you know what you're doing). @@ -2826,7 +2826,7 @@ func getCrtcTransformReply(buf []byte) *GetCrtcTransformReply {  		byteString := make([]byte, v.PendingLen)  		copy(byteString[:v.PendingLen], buf[b:])  		v.PendingFilterName = string(byteString) -		b += xgb.Pad(int(v.PendingLen)) +		b += int(v.PendingLen)  	}  	v.PendingParams = make([]render.Fixed, v.PendingNparams) @@ -2840,7 +2840,7 @@ func getCrtcTransformReply(buf []byte) *GetCrtcTransformReply {  		byteString := make([]byte, v.CurrentLen)  		copy(byteString[:v.CurrentLen], buf[b:])  		v.CurrentFilterName = string(byteString) -		b += xgb.Pad(int(v.CurrentLen)) +		b += int(v.CurrentLen)  	}  	v.CurrentParams = make([]render.Fixed, v.CurrentNparams) @@ -3518,7 +3518,7 @@ func getProviderInfoReply(buf []byte) *GetProviderInfoReply {  		byteString := make([]byte, v.NameLen)  		copy(byteString[:v.NameLen], buf[b:])  		v.Name = string(byteString) -		b += xgb.Pad(int(v.NameLen)) +		b += int(v.NameLen)  	}  	return v | 
