This repository was archived by the owner on Jan 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vm_tools: Rename zcr_text_input_x11 to zcr_text_input_crostini & tidy
We use the zcr_text_input_x11 protocol between sommelier and cros_im to support IMEs on X11 applications. This CL renames the protocol to zcr_text_input_crostini, as we want to add additional Crostini-only communications between sommelier and cros_im for IME support that are not specific to X11. In addition to renaming, we also make the protocol a bit more standard: - Instead of having functions on a singleton which take a text_input object, use a factory zcr_text_input_crostini_manager to create zcr_text_input_crostini objects which are already bound to a text_input object. This will also make it simpler to add events (calls from sommelier to cros_im) later on. - Add a destructor to zcr_text_input_crostini, we may end up creating and destroying multiple of these and this prevents leaks in the compositor while an app is running. As users may end up with outdated cros_im versions, sommelier will need to continue supporting zcr_text_input_x11 for some time (at least a few milestones). cros_im still falls back to zcr_text_input_x11, but we can remove that as soon as M118 branches off. BUG=b:264949241 TEST=Manually test VS Code and gedit with new cros_im only/new sommelier only/new cros_im & sommelier. Change-Id: Iaa1e8fa8881f2d2af7ef1e7a19f403526e34ccba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/4764984 Reviewed-by: Sophia Lin <[email protected]> Commit-Queue: Timothy Loh <[email protected]> Tested-by: kokoro <[email protected]> Reviewed-by: Nic Hollingum <[email protected]>
- Loading branch information
Showing
7 changed files
with
177 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<protocol name="text_input_crostini_unstable_v1"> | ||
|
||
<copyright> | ||
Copyright 2023 The ChromiumOS Authors | ||
Use of this source code is governed by a BSD-style license that can be | ||
found in the LICENSE file. | ||
</copyright> | ||
|
||
<interface name="zcr_text_input_crostini_manager_v1" version="1"> | ||
<description summary="factory for zcr_text_input_crostini_v1"> | ||
</description> | ||
|
||
<enum name="error"> | ||
<entry name="text_input_crostini_exists" value="0" | ||
summary="the text_input already has an text_input_crostini object associated"/> | ||
</enum> | ||
|
||
<request name="get_text_input_crostini"> | ||
<description summary="get zcr_text_input_crostini_v1 object"> | ||
Create a zcr_text_input_crostini_v1 object for a text_input. | ||
If an object has already been created, the text_input_crostini_exists | ||
protocol error is raised. | ||
</description> | ||
<arg name="id" type="new_id" interface="zcr_text_input_crostini_v1"/> | ||
<arg name="text_input" type="object" interface="zwp_text_input_v1"/> | ||
</request> | ||
|
||
</interface> | ||
|
||
<interface name="zcr_text_input_crostini_v1" version="1"> | ||
<description summary="Crostini extension support for text_input"> | ||
Adds extra text_input functionality specific to Crostini. This is only | ||
used between sommelier and cros_im. | ||
</description> | ||
|
||
<request name="destroy" type="destructor"> | ||
<description summary="destroy zcr_text_input_crostini_v1 object"/> | ||
</request> | ||
|
||
<request name="activate_x11"> | ||
<description summary="request activation"> | ||
Calls text_input::activate with the X11 window id converted to the | ||
matching wl_surface. | ||
</description> | ||
<arg name="seat" type="object" interface="wl_seat"/> | ||
<arg name="x11_window_id" type="uint"/> | ||
</request> | ||
</interface> | ||
</protocol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters