@@ -120,20 +120,10 @@ void WSS::IPC::Start() {
120120 Listen (" appd-application-run" , [this ](Shell* shell, const IPCClientInfo* client, const json_object* payload) {
121121 std::string prefix = JSON_GET_STR (payload, " prefix" );
122122 std::string appId = JSON_GET_STR (payload, " appId" );
123+ WSS_DEBUG (" Running application with ID: {} using prefix: {}" , appId, prefix);
123124 shell->GetAppd ().RunApplication (prefix, appId);
124125 });
125126
126- Listen (" monitor-info-request" , [this ](Shell* shell, const IPCClientInfo* client, const json_object* payload) {
127- auto monitor = shell->GetWidget (client->widgetName )->GetMonitorInfo (client->monitorId );
128-
129- json_object* response = json_object_new_object ();
130- json_object_object_add (response, " id" , json_object_new_int (client->monitorId ));
131- json_object_object_add (response, " width" , json_object_new_int (GetScreenWidth (client->monitorId )));
132- json_object_object_add (response, " height" , json_object_new_int (GetScreenHeight (client->monitorId )));
133- Send (client->wsi , " monitor-info-response" , response);
134- json_object_put (response);
135- });
136-
137127 Listen (" appd-application-list-request" , [this ](Shell* shell, const IPCClientInfo* client, const json_object* payload) {
138128 json_object* response = json_object_new_array ();
139129 for (const auto & [name, app] : shell->GetAppd ().GetApplications ()) {
@@ -150,6 +140,30 @@ void WSS::IPC::Start() {
150140 json_object_put (response);
151141 });
152142
143+ Listen (" monitor-info-request" , [this ](Shell* shell, const IPCClientInfo* client, const json_object* payload) {
144+ auto monitor = shell->GetWidget (client->widgetName )->GetMonitorInfo (client->monitorId );
145+
146+ json_object* response = json_object_new_object ();
147+ json_object_object_add (response, " id" , json_object_new_int (client->monitorId ));
148+ json_object_object_add (response, " width" , json_object_new_int (GetScreenWidth (client->monitorId )));
149+ json_object_object_add (response, " height" , json_object_new_int (GetScreenHeight (client->monitorId )));
150+ Send (client->wsi , " monitor-info-response" , response);
151+ json_object_put (response);
152+ });
153+
154+ Listen (" widget-set-keyboard-interactivity" , [this ](Shell* shell, const IPCClientInfo* client, const json_object* payload) {
155+ std::string widgetName = client->widgetName ;
156+ int monitorId = client->monitorId ;
157+ auto widget = shell->GetWidget (widgetName);
158+ if (!widget) {
159+ WSS_ERROR (" Widget '{}' not found for setting keyboard interactivity." , widgetName);
160+ return ;
161+ }
162+
163+ bool interactive = JSON_GET_BOOL (payload, " interactive" );
164+ widget->SetKeyboardInteractivity (monitorId, interactive);
165+ });
166+
153167 m_MousePositionRunning = true ;
154168 m_MousePositionThread = std::thread ([this ]() {
155169 try {
0 commit comments