@@ -21,8 +21,6 @@ impl AppmenuPath {
2121 }
2222}
2323
24- use crate :: niri:: State ;
25-
2624const PROTOCOL_VERSION : u32 = 2 ;
2725
2826pub struct OrgKdeKwinAppmenuManagerState { }
@@ -85,18 +83,19 @@ where
8583 }
8684}
8785
88- impl GlobalDispatch < OrgKdeKwinAppmenuManager , OrgKdeKwinAppmenuManagerGlobalData , State >
86+ impl < D > GlobalDispatch < OrgKdeKwinAppmenuManager , OrgKdeKwinAppmenuManagerGlobalData , D >
8987 for OrgKdeKwinAppmenuManagerState
88+ where
89+ D : Dispatch < OrgKdeKwinAppmenuManager , ( ) > ,
9090{
9191 fn bind (
92- _state : & mut State ,
92+ _state : & mut D ,
9393 _handle : & DisplayHandle ,
9494 _client : & Client ,
9595 resource : smithay:: reexports:: wayland_server:: New < OrgKdeKwinAppmenuManager > ,
9696 _global_data : & OrgKdeKwinAppmenuManagerGlobalData ,
97- data_init : & mut DataInit < ' _ , State > ,
97+ data_init : & mut DataInit < ' _ , D > ,
9898 ) {
99- info ! ( "init appmenu manager" ) ;
10099 data_init. init ( resource, ( ) ) ;
101100 }
102101
@@ -105,15 +104,18 @@ impl GlobalDispatch<OrgKdeKwinAppmenuManager, OrgKdeKwinAppmenuManagerGlobalData
105104 }
106105}
107106
108- impl Dispatch < OrgKdeKwinAppmenu , OrgKdeKwinAppmenuState , State > for OrgKdeKwinAppmenuManagerState {
107+ impl < D > Dispatch < OrgKdeKwinAppmenu , OrgKdeKwinAppmenuState , D > for OrgKdeKwinAppmenuManagerState
108+ where
109+ D : OrgKdeKwinAppmenuManagerHandler ,
110+ {
109111 fn request (
110- state : & mut State ,
112+ state : & mut D ,
111113 _client : & Client ,
112114 _resource : & OrgKdeKwinAppmenu ,
113115 request : <OrgKdeKwinAppmenu as Resource >:: Request ,
114116 data : & OrgKdeKwinAppmenuState ,
115117 _dhandle : & DisplayHandle ,
116- _data_init : & mut DataInit < ' _ , State > ,
118+ _data_init : & mut DataInit < ' _ , D > ,
117119 ) {
118120 match request {
119121 wayland_protocols_plasma:: appmenu:: server:: org_kde_kwin_appmenu:: Request :: SetAddress { service_name, object_path } => {
0 commit comments