44 async_engine:: { Phase , SpawnedFuture } ,
55 backend:: {
66 AXIS_120 , AxisSource , Backend , BackendConnectorState , BackendDrmDevice , BackendEvent ,
7- Connector , ConnectorEvent , ConnectorId , ConnectorKernelId , DrmDeviceId , DrmEvent ,
8- InputDevice , InputDeviceAccelProfile , InputDeviceCapability , InputDeviceClickMethod ,
9- InputDeviceId , InputEvent , KeyState , Mode , MonitorInfo , ScrollAxis , TransformMatrix ,
7+ ButtonState , Connector , ConnectorEvent , ConnectorId , ConnectorKernelId , DrmDeviceId ,
8+ DrmEvent , InputDevice , InputDeviceAccelProfile , InputDeviceCapability ,
9+ InputDeviceClickMethod , InputDeviceId , InputEvent , KeyState , Mode , MonitorInfo ,
10+ ScrollAxis , TransformMatrix ,
1011 transaction:: {
1112 BackendAppliedConnectorTransaction , BackendConnectorTransaction ,
1213 BackendConnectorTransactionError , BackendConnectorTransactionType ,
@@ -817,8 +818,8 @@ impl XBackend {
817818 match event. code ( ) {
818819 XiMotion :: OPCODE => self . handle_input_motion ( event) ,
819820 XiEnter :: OPCODE => self . handle_input_enter ( event) ,
820- XiButtonPress :: OPCODE => self . handle_input_button_press ( event, KeyState :: Pressed ) ,
821- XiButtonRelease :: OPCODE => self . handle_input_button_press ( event, KeyState :: Released ) ,
821+ XiButtonPress :: OPCODE => self . handle_input_button_press ( event, ButtonState :: Pressed ) ,
822+ XiButtonRelease :: OPCODE => self . handle_input_button_press ( event, ButtonState :: Released ) ,
822823 XiKeyPress :: OPCODE => self . handle_input_key_press ( event, KeyState :: Pressed ) ,
823824 XiKeyRelease :: OPCODE => self . handle_input_key_press ( event, KeyState :: Released ) ,
824825 XiHierarchy :: OPCODE => self . handle_input_hierarchy ( event) . await ,
@@ -829,14 +830,14 @@ impl XBackend {
829830 fn handle_input_button_press (
830831 self : & Rc < Self > ,
831832 event : & Event ,
832- state : KeyState ,
833+ state : ButtonState ,
833834 ) -> Result < ( ) , XBackendError > {
834835 let event: XiButtonPress = event. parse ( ) ?;
835836 if let Some ( seat) = self . mouse_seats . get ( & event. deviceid ) {
836837 let button = event. detail ;
837838 // let button = seat.button_map.get(&event.detail).unwrap_or(event.detail);
838839 if matches ! ( button, 4 ..=7 ) {
839- if state == KeyState :: Pressed {
840+ if state == ButtonState :: Pressed {
840841 let ( axis, val) = match button {
841842 4 => ( ScrollAxis :: Vertical , -1 ) ,
842843 5 => ( ScrollAxis :: Vertical , 1 ) ,
0 commit comments