Fix macOS IME overlay positioning (#21416)
Release Notes: - Improved positioning of macOS IME overlay --------- Co-authored-by: Richard Feldman <richard@zed.dev>
This commit is contained in:
parent
4e12f0580a
commit
7c40824783
2 changed files with 6 additions and 2 deletions
|
@ -1701,7 +1701,10 @@ extern "C" fn first_rect_for_character_range(
|
|||
let lock = state.lock();
|
||||
let mut frame = NSWindow::frame(lock.native_window);
|
||||
let content_layout_rect: CGRect = msg_send![lock.native_window, contentLayoutRect];
|
||||
frame.origin.y -= frame.size.height - content_layout_rect.size.height;
|
||||
let style_mask: NSWindowStyleMask = msg_send![lock.native_window, styleMask];
|
||||
if !style_mask.contains(NSWindowStyleMask::NSFullSizeContentViewWindowMask) {
|
||||
frame.origin.y -= frame.size.height - content_layout_rect.size.height;
|
||||
}
|
||||
frame
|
||||
};
|
||||
with_input_handler(this, |input_handler| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue