linux: Fix IME panel position while enumerating input methods (#12495)

Release Notes:

- N/A

This updates the IME position every time the selection changes, this is
probably only useful when you enumerate languages with your IME.

TODO:
- ~There is a rare chance that the ime panel is not updated because the
window input handler is None.~
- ~Update IME panel in vim mode.~
- ~Update IME panel when leaving Buffer search input.~

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
Fernando Tagawa 2024-08-28 23:58:40 -03:00 committed by GitHub
parent e6d5f4406f
commit 8e8927db4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 244 additions and 55 deletions

View file

@ -318,15 +318,6 @@ fn init_ui(
}
fn main() {
#[cfg(target_os = "windows")]
{
use zed::single_instance::*;
if !check_single_instance() {
println!("zed is already running");
return;
}
}
let start_time = std::time::Instant::now();
menu::init();
zed_actions::init();
@ -369,9 +360,19 @@ fn main() {
}
}
}
#[cfg(not(any(target_os = "linux", target_os = "windows")))]
#[cfg(target_os = "windows")]
{
use zed::only_instance::*;
use zed::windows_only_instance::*;
if !check_single_instance() {
println!("zed is already running");
return;
}
}
#[cfg(target_os = "macos")]
{
use zed::mac_only_instance::*;
if ensure_only_instance() != IsOnlyInstance::Yes {
println!("zed is already running");
return;

View file

@ -2,11 +2,11 @@ mod app_menus;
pub mod inline_completion_registry;
#[cfg(target_os = "linux")]
pub(crate) mod linux_prompts;
#[cfg(not(any(target_os = "linux", target_os = "windows")))]
pub(crate) mod only_instance;
#[cfg(target_os = "macos")]
pub(crate) mod mac_only_instance;
mod open_listener;
#[cfg(target_os = "windows")]
pub(crate) mod single_instance;
pub(crate) mod windows_only_instance;
pub use app_menus::*;
use assistant::PromptBuilder;