mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
Focus new windows on macOS
This commit is contained in:
parent
d552c6b251
commit
39ea7271e3
3 changed files with 14 additions and 0 deletions
|
@ -10,6 +10,10 @@ Notable changes to the `alacritty_terminal` crate are documented in its
|
|||
|
||||
## 0.15.0-dev
|
||||
|
||||
### Changed
|
||||
|
||||
- Always focus new windows on macOS
|
||||
|
||||
### Fixed
|
||||
|
||||
- Mouse/Vi cursor hint highlighting broken on the terminal cursor line
|
||||
|
|
|
@ -484,6 +484,10 @@ impl Display {
|
|||
|
||||
window.set_visible(true);
|
||||
|
||||
// Always focus new windows, even if no Alacritty window is currently focused.
|
||||
#[cfg(target_os = "macos")]
|
||||
window.focus_window();
|
||||
|
||||
#[allow(clippy::single_match)]
|
||||
#[cfg(not(windows))]
|
||||
if !_tabbed {
|
||||
|
|
|
@ -224,6 +224,12 @@ impl Window {
|
|||
self.window.set_visible(visibility);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[inline]
|
||||
pub fn focus_window(&self) {
|
||||
self.window.focus_window();
|
||||
}
|
||||
|
||||
/// Set the window title.
|
||||
#[inline]
|
||||
pub fn set_title(&mut self, title: String) {
|
||||
|
|
Loading…
Reference in a new issue