Changed how buttons are stored in press and release events
This commit is contained in:
@@ -42,7 +42,9 @@ func (backend *Backend) handleButtonPress (
|
||||
event xevent.ButtonPressEvent,
|
||||
) {
|
||||
buttonEvent := *event.ButtonPressEvent
|
||||
backend.channel <- stone.EventPress(buttonEvent.Detail)
|
||||
backend.channel <- stone.EventPress {
|
||||
Button: stone.Button(buttonEvent.Detail),
|
||||
}
|
||||
}
|
||||
|
||||
func (backend *Backend) handleButtonRelease (
|
||||
@@ -50,7 +52,9 @@ func (backend *Backend) handleButtonRelease (
|
||||
event xevent.ButtonReleaseEvent,
|
||||
) {
|
||||
buttonEvent := *event.ButtonReleaseEvent
|
||||
backend.channel <- stone.EventRelease(buttonEvent.Detail)
|
||||
backend.channel <- stone.EventRelease {
|
||||
Button: stone.Button(buttonEvent.Detail),
|
||||
}
|
||||
}
|
||||
|
||||
func (backend *Backend) handleKeyPress (
|
||||
@@ -59,7 +63,7 @@ func (backend *Backend) handleKeyPress (
|
||||
) {
|
||||
keyEvent := *event.KeyPressEvent
|
||||
button := backend.keycodeToButton(keyEvent.Detail, keyEvent.State)
|
||||
backend.channel <- stone.EventPress(button)
|
||||
backend.channel <- stone.EventPress { Button: button }
|
||||
}
|
||||
|
||||
func (backend *Backend) handleKeyRelease (
|
||||
@@ -68,7 +72,7 @@ func (backend *Backend) handleKeyRelease (
|
||||
) {
|
||||
keyEvent := *event.KeyReleaseEvent
|
||||
button := backend.keycodeToButton(keyEvent.Detail, keyEvent.State)
|
||||
backend.channel <- stone.EventRelease(button)
|
||||
backend.channel <- stone.EventRelease { Button: button }
|
||||
}
|
||||
|
||||
func (backend *Backend) handleMotionNotify (
|
||||
|
||||
Reference in New Issue
Block a user