forked from joejulian/gio
io/pointer: rename button names to reflect their meaning, not placement
For example, ButtonLeft may be the right-most button for a left-handed user.
Rename the button names to match their intended use.
This is an API change. Use the following commands to update your
projects:
$ gofmt -r 'pointer.ButtonLeft -> pointer.ButtonPrimary' -w .
$ gofmt -r 'pointer.ButtonRight -> pointer.ButtonSecondary' -w .
$ gofmt -r 'pointer.ButtonMiddle -> pointer.ButtonTertiary' -w .
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -801,11 +801,11 @@ func gio_onPointerButton(data unsafe.Pointer, p *C.struct_wl_pointer, serial, t,
|
||||
var btn pointer.Buttons
|
||||
switch wbtn {
|
||||
case BTN_LEFT:
|
||||
btn = pointer.ButtonLeft
|
||||
btn = pointer.ButtonPrimary
|
||||
case BTN_RIGHT:
|
||||
btn = pointer.ButtonRight
|
||||
btn = pointer.ButtonSecondary
|
||||
case BTN_MIDDLE:
|
||||
btn = pointer.ButtonMiddle
|
||||
btn = pointer.ButtonTertiary
|
||||
default:
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user