- Yanked
0.15.9
and publish a new minor as0.15.9
included breaking changes by depending ontao-macros
.- 5397b8f6 chore: bump minor on 2023-01-11
- On Linux, Fix mnemonics for submenus.
- On iOS, add Sync trait to
EventLoopProxy
whenT
has Send trait. - On Linux, fix setting min/max size clears the other.
- Fix resize event emits before fullscreen actually exit.
- Add
WindowBuilder::with_visible_on_all_workspaces
andWindow::set_visible_on_all_workspaces
. - Add
WindowExtWindows::set_undecorated_shadow
andWindowBuilderExtWindows::with_undecorated_shadow
to draw the drop shadow behind a borderless window.
- Add
with_cursor_moved
Unix extension trait method.
- On Linux, fix menu item mnemonics.
- On Windows, retain
WS_MAXIMIZE
window style when unminimizing a maximized window. - On macOS, strip menu mnemonics for consistency with other platforms.
- Revert
nextResponder
call because this will bring key beep sound regression. We'll call the key equivalent in wry instead.
- Change
WebviewAttributes::focused
default totrue
.- ece3e8f6 fix: default
focused
to true on 2022-11-20
- ece3e8f6 fix: default
- On Linux, wake the main context in
EventLoopProxy::send_event()
.
- On macOS, call next responder in view's keyDown and doCommandbySelector.
- On macOS, remove
doCommandBySelector
in view since this will block the key event to responder chain.
- On Windows, fix compliation regression introduced in 0.15.1 when
tray
feature is active
- On Windows, fix window always visible initially.
- ae06c3e2 fix(Windows): fix windows always visible initially on 2022-11-08
- Add support for parsing
ArrowUp
,ArrowDown
,ArrowLeft
andArrowRight
in a str as valid key. Previously onlyUp
,Down
,Left
andRight
worked. - Add
WindowBuilder::with_content_protection
. - On macOS, fix default cursor always being arrow cursor
- On Windows, fixed focus event emission on minimize.
- Update jni to 0.20.
- On Linux, add DeviceEvent::Key.
- fix(linux): Improve event loop process on Linux a bit. This changes only a few check and should make dragging windows on egui smoother.
- Fix inverted delta in
WindowEvent::MouseWheel
on Linux - Add
EventLoopExtMacOS::set_activate_ignoring_other_apps
on macOS. - Add
WindowExtMacOS::set_allows_automatic_window_tabbing
,WindowExtMacOS::allows_automatic_window_tabbing
, andWindowBuilderExtMacOS::with_automatic_window_tabbing
on macOS. - Support cross compiling for macos from a non macos host.
- Add
WindowExtMacOS::is_doucmented_edited
andWindowExtMacOS::set_is_doucmented_edited
on macOS. - On macOS, scale menu item icons height to 18.
- Add support for the "+" key in menu accelerators using
KeyCode::Plus
or the "Plus" keyword. See documentation forKeyCode::Plus
for notes on platform-dependent behaviour. - Add the application name to the "Quit" and "Hide" native menu items on macOS.
- Fix the native Services menu on macOS.
- Scale the tray icon according to its aspect ratio on macOS.
- Add builder methods on Linux to control the drawing behavior of the window.
WindowBuilderExtUnix::with_double_buffered
,WindowBuilderExtUnix::with_rgba_visual
andWindowBuilderExtUnix::with_app_paintable
- On Windows, show Window menu (also known as the System menu or Control menu) in response to Alt+Space.
- On Windows, fix icons specified on
WindowBuilder
not taking effect for windows created after the firt one. - Added tabbing identifier APIs on macOS.
- On Linux, reduce channel redirect. Now sending user events and redraw request will send to event loops directly.
- Add
WindowBuilder::with_focused
to specify whether to initially focus the window or not. - Add APIs for disabling the individual window controls on desktop platforms,
Window::set_closable
,Window::is_closable
,WindowBuilder::with_closable
,Window::set_minimizable
,Window::is_minimizable
,WindowBuilder::with_minimizable
,Window::set_maximizable
,Window::is_maximizable
,WindowBuilder::with_maximizable
. See the docs for platform-specific notes, especially regarding Linux. - Add
Window::title
to get the current window title. - Default to MOD_NOREPEAT for registering global shortcuts / hotkeys via win32 RegisterHotKey on Windows. This prevents shortcuts from repeatedly activating when the accelerator is pressed and held down, and ensures that we maintain platform-agnostic consistency.
- Implement "always on bottom" as contrary to "always on top".
- Fix calling android functions when package name contained escaped underscore.
- Add
Window::set_content_protection
for macOS and Windows. -
- Add DeviceEventFilter on Windows.
- Breaking: On Windows, device events are now ignored for unfocused windows by default, use
EventLoopWindowTarget::set_device_event_filter
to set the filter level. - 5bbd4f8f Add DeviceEventFilter on Windows (#465) on 2022-08-17
- Fix system tray creation after event loop starts on macOS.
- Fix resize doesn't work when calling with resizable. Also add platform specific note to
set_resizable
. On Linux, most size methods like maximized are async and do not work well with calling sequentailly. For setting inner or outer size, you don't need to set resizable to true before it. It can resize no matter what. But if you insist to do so, it has a100, 100
minimum limitation somehow. For maximizing, it requires resizable is true. If you really want to set resizable to false after it. You might need a mechanism to check the window is really maximized. - Add
Window::is_focused
. - On Linux, fix global shortcut are never triggered when a Lock key is ON, eg. NumLock, CapsLock.
- Disables the global shortcut manager on wayland as its X11-specific.
- Added
SystemTrayExtMacOS::set_title
toSystemTray
andSystemTrayBuilderExtMacOS::with_title
to set the tray icon title on MacOS - Update
windows-rs
to the latest 0.39.0 release.
The alloc
feature has been removed, which means it no longer accepts Rust String
or &str
parameters and implicitly converts them to PWSTR
or PSTR
.
For string literals, that feature was replaced with s!()
and w!()
macros which null terminate the string literal at compile time and convert to UTF-16 if necessary. The s!()
macro is fine, however the w!()
macro uses HSTRING
types from WinRT for maximum compatibility with WinRT types. Since Tao only uses Win32 APIs, this change relies on util::encode_wide
to convert to a Vec<u16>
instead.
- Implement custom protocol on Android.
- Changed
WebViewMessage::Eval
to evaluate an specific script. - Fix webview initialization scripts implementation on Android.
- Removed the webview logic from the Android glue.
- Implement
SystemTray::set_tooltip
andSystemTrayBuilder::with_tooltip
on Windows.
- Remove the NSStatusItem from the menu bar when the
SystemTray
instance is dropped. - Fixes
Window::is_decorated
always returningtrue
on macOS. - Fix theme feature to support Darker theme on Linux.
- Add
Window::is_minimized()
. - Implement
SystemTrayBuilder::with_tooltip
andSystemTray::set_tooltip
on macOS. - On Windows, fix a ghost window appearing occasionally when clicking the tray icon.
- Added
SystemTrayBuilder::with_id
and theid
field toEvent::TrayEvent
for better multitray support. - Hide the app indicator when dropping
SystemTray
on Linux
- On Linux, fix Window can't be displayed on wayland.
- On Linux, receive only one draw event per cycle to prevent receiving infinite draw events.
-
- On Linux, add
EventLoopWindowTargetExtUnix
for methods to determine if the backend is x11 or wayland.
- On Linux, add
- On Linux, add
x11
module for glutin internal use. This is basically just x11-dl, but winit secretly exports it. - On Linux, add
WindowBuilder::with_transparent_draw
to disable the internal draw for transparent window and allows users to draw it manually. - db7e5cb4 feat(linux): Add necessary features for creating GL windows (#495) on 2022-07-25
- Breaking Updated
raw-window-handle
to0.5
and addedWindow::raw_display_handle
andEventLoopWindowTarget::raw_display_handle
. - On Windows, respect min/max inner sizes when creating the window.
- On Windows, fix assigning the wrong mintor rect to undecorated maximized window. This caused a blank window downstream in wry and tauri.
- Fixed set_inner_size is reset when resizable is set to false.
- On Windows, prevent ghost window from showing up in the taskbar after either several hours of use or restarting
explorer.exe
. - Add theme feature on Linux.
- Fix maximizing window on Linux.
- On macOS, fallback resize event for NSWindow to handle.
- ab2e57e9 On macOS, fallback resize event for NSWindow to handle on 2022-07-12
- Add
CustomMenuItem::set_icon
. Only implemented on macOS for now. - On Windows, subscribe to taskbar restart event and re-add the system tray icon. Also skip the window from the taskbar if it was already skipped.
- On Windows, fix focus events being sent to inactive windows.
- Revert #427 due to random crash caused by it.
- On macOS, fix native file dialogs hanging the event loop and
having multiple windows would prevent
run_return
from ever returning. - Fix maximizing window.
- On Windows, fix wrong fullscreen monitors being recognized when handling
WM_WINDOWPOSCHANGING
messages - Fix global hide others shortcut.
- Fix window can't be hidden when maximized.
- On macOS,
WindowEvent::Resized
is now emitted inframeDidChange
instead ofwindowDidResize
. - On Linux, adds
SystemTrayBuilderExtLinux::with_temp_icon_dir
which sets a custom temp icon dir to store generated icon files. This may be useful when the application requires icons to be stored in a specific location, such as when running in a Flatpak sandbox. - On Linux, store tray icons in
$XDG_RUNTIME_DIR
. This is preferred over/tmp
, because this directory (typically/run/user/{uid}
) is only readable for the current user. While/tmp
is shared with all users. - Do not emit the
ThemeChanged
event when the window theme is set and the system theme changes (the window keeps its theme in this scenario). - Remvoe
core-video-sys
dependency. - The
theme
function nowTheme::Light
on macOS older than 10.14 and the initial theme setter has no effect instead of crashing the application. - Reduce
WM_PAINT
singal on event target window to prevent from webview2 delay.
- Fixes the
Ivar menu_on_left_click not found on class TaoTrayHandler
panic on macOS.- 2cc163d2 fix(macos): crash on tray class usage on 2022-06-14
- Fix macOS
SystemTrayExtMacOS
implementation.- f42c1be1 fix: fix wrong macOS trait implementation on 2022-06-14
- Breaking change
SystemTrayBuilder::new
andSystemTray::set_icon
now takessystem_tray::Icon
on all platforms. - Allow to disable system tray menu only on Left Click.
- Connect mouse wheel event with GTK window.
- Support child window on Linux.
- Support theme on macOS.
- Add
Window::set_ignore_cursor_events
- Fix movable window background on macOS.
- Remove trivial tray features.
- Fix the size of the slice passed to
DragQueryFileW
by passingstd::mem::transmute(path_buf.spare_capacity_mut())
instead of&mut path_buf
.
- Add standalone webview ndk port.
- Update the
windows
crate to the latest 0.37.0 release.
The #[implement]
macro in windows-implement
and the implement
feature in windows
depend on some const
generic features which stabilized in rustc
1.61. The MSRV on Windows targets is effectively 1.61, but other targets do not require these features.
Since developers on non-Windows platforms are not always able to upgrade their toolchain with rustup
, the package remains at 1.56. Windows developers may get less friendly compiler errors about using unstable language features until they upgrade their toolchain if they build tao
without wry
, which has some Windows-specific dependencies that transitively raise the MSRV for wry
to 1.61.
- The
current_monitor
function now fallbacks to the primary monitor when the window is invisible. - Change menubar background color to transparent on Linux when the window is transparent.
- Rename full screen menu label to "Toggle Full Screen".
- On Windows, remove the accelerator from
CustomMenuItem::title
returnd string. - On Windows and Linux, increase the resizing area for borderless windows based on scale factor.
- Implement
Window::set_cursor_position
for Linux.
- Do not fire
WindowEvent::Moved
whenis_maximized
is called on macOS.
- Fixes compilation when only the
tray
feature is enabled.
- Add
EventLoopWindowTargetExtMacOS::set_activation_policy_at_runtime
. - On Windows and Linux, disable resizing maximized borderless windows.
- Breaking change: Renamed the
ayatana
Cargo feature toayatana-tray
, now the default feature for tray on Linux, and added thegtk-tray
feature. - On Windows, Fix
Window::set_inner_size
setting a bigger size than requested.
- Fire
Event::LoopDestroyed
when the macOS dockQuit
menu item is clicked. - Added
Event::DecorationsClick
(Windows only). - Enhance the
MenuItem::About
menu on Linux. Breaking change: The About variant now uses an struct instead of a string. - Fixes the About menu on Linux not being shown.
- Properly fire
WindowEvent::Destroyed
on Linux when theWindow
is dropped. - Properly change the window to fullscreen state if the builder instructs it to use
Fullscreen::Borderless(None)
. - Fixes system tray item titles on Windows by forcing the string to be null-terminated.
- Properly fire
WindowEvent::Destroyed
on macOS when theWindow
is dropped. - Fix inconsist behaviour when setting menu on mac.
- Fix a deadlock on Windows when using
Window::set_visible(true)
in theEventLoop::run
closure. - On Windows, apply maximize state before minimize. Fixes
Window::set_minimized
not working when the window is maximized.
- Revert Global Shortcut fix on Linux. See #331 for more information.
- Fixes the
set_fullscreen
implementation on Linux when theFullscreen::Borderless
value is set toNone
.
- Fix global shortcut support on Linux (both x11 and wayland).
- Update to gtk 0.15
- Emit errors when parsing an invalid accelerator from a string.
- Add support for more accelerator keys:
,
-
.
=
;
/
\
'
`
[
]
Space
Tab
andF13
-F24
- Increased Borderless window resizing inset.
- Update to 2021 edition and msrv to 1.56
- Breaking: Rename the
Exit
variant ofControlFlow
toExitWithCode
, which holds a value to control the exit code after running. Add anExit
constant which aliases toExitWithCode(0)
instead to avoid major breakage. This shouldn't affect most existing programs. - Fixes the
MenuItem::Quit
behavior on Windows. - Add support for
SPACE
shortcut key on Windows. - Fix linux native menu items not working.
-
- Fix resizing undecorated window on Linux.
- Undecorated window can be resized using touch on Linux.
- 0dd71973 Merge next back to dev branch (#305) on 2022-02-05
- Fix focus events not firing on Linux
- Add monitor selection when fullscreen on Linux and close possible way to create VideoMode on Linux since gtk doesn't acutally have such feature.
- Add run_return trait on Linux
window.set_skip_taskbar()
on Linux will now also skip the pager (Alt+Tab), this matches the behavior on Windows.- Update tray dependency version.
- Fix deadlock when unregistering shortcut on Linux.
- Fire
WindowEvent::Resized
andWindowEvent::Moved
when window is min/maximized on Linux to align with Windows behavior. - Fix menubar missing on borderless window.
- Fix core-video-sys dependency.
- Fix linking to the
ColorSync
framework on macOS 10.7, and in newer Rust versions. - Allow more strings to parse to keycode, for example
,
is now parsed as a comma. -
- Update
raw-window-handle
to0.4
- Update
- Add
raw_window_handle()
implementation on linux. - 0dd71973 Merge next back to dev branch (#305) on 2022-02-05
- Fix click events missing whe tray has menu.
- Add macOS
show_application()
method - Add new_any_thread to Unix event loop.
- Replace all of the
winapi
crate references with thewindows
crate. The generated bindings are in thewebview2-com-sys
crate to share types with WRY later. - Implement
Clone
forEventLoopWindowTarget
. - Update the
windows
crate to 0.25.0, which comes with pre-built libraries. Tao no longer depends onwebview2-com-sys
to generate bindings shared with WRY. - Update the
windows
crate to 0.29.0. - Update the
windows
crate to 0.30.0. This version re-introduced a lot of new-types for things like HWND, LRESULT, WPARAM, LPARAM, etc. - Fix using
WindowBuilder::with_visible
andWindowBuilder::with_maximized
not behaving correctly. - On Windows, send correct position on system tray events.
- Add support for more accelerator keys:
,
-
.
=
;
/
\
'
`
[
]
Space
Tab
andF13
-F24
- Allow more strings to parse to keycode, for example
,
is now parsed as a comma. - Add macOS
show_application()
method
- Fix missing
Sync
trait on EventLoopProxy. This commit also introducescrossbeam-channel
crate which could also improve the performance.
- Remove feature flag that break doc builds
-
Move
global_shortcut
mod to the lib root. -
Bump gtk-rs to version 0.14. This also introduces a new feature
ayatana
for developers to use updatedlibayatana-appindicator
since the originallibappindicator
is no longer maintained. -
Remove Clipboard MenuItem on Linux since they only work on a few sepcific widget.
-
Fixes incorrect monitor size on Linux.
-
Fix
no key equivalent for Accelerator
forSpace
,Escape
,Minus
andEqual
keycode. -
Fix incorrect macOS Redo and Close Window shortcuts
-
- Support macOS tray icon template to adjust automatically based on taskbar color.
-
Images you mark as template images should consist of only black and clear colors. You can use the alpha channel in the image to adjust the opacity of black content, however.
-
577458c4 feat(tray): Support macOS icon template (#162) on 2021-07-29
-
macOS: Add
with_parent_window()
onWindowBuilder
. -
Removed
SystemTrayExtWindows::remove()
, the icon will be automatically removed whenSystemTray
is dropped. -
Add
MenuItem::SelectAll
implementation on windows. -
Add flags to support all other possible unix systems.
-
Fix confliction between
set_skip_taksbar(true)
andset_visible(false)
.
- On Windows, Allow resizing of
decorations: false
aka borderless window. - Do not close the window on
CloseRequested
event and let the user handle it, keeping compatibility with macOS and Windows behavior. - On Windows, fix Aero-Snap for
decorations: false
aka borderless window. - Implement
MonitorHandle
and related methods on Linux. - Add
is_menu_visilbe
getter onWindow
- On macOS, make sure the
set_focus
is triggered even if the window is not visible. - Fix
with_visible(bool)
inWindowBuilder
for macOS. - Mark enums as
#[non_exhaustive]
to prevent breaking changes on enum update. - Remove
with_focus
andfocus
field inWindowAttribute
. Useset_focus
instead in most cases. - Revert d344825 and move
set_skip_taskbar
back behind aWindowExtWindows
andWindowExtUnix
. SystemTray
exposeset_menu
to update the system tray menu once created.- Only show window behaviour when it is visible. winuser::ShowWindow will show the window and make with_visible(false) obsolete.
- Add
with_skip_taskbar
behindWindowBuilderExtWindows
andWindowBuilderExtUnix
.
- Add
window_id
toMenuEvent
. - Prevent duplicate
MenuEvent
on window menu in Windows.
- Drop the event callback before exiting on macOS.
- Add
clipboard
api exposingread_text
andwrite_text
. - Fix LoopDestroyed to really exit the application.
- 55e52a91 Fix LoopDestroy condition to really exit the app on 2021-06-01
- Implement all control flow variants
- 16e2ac06 Add change file on 2021-05-19
- Add checks before focusing window
- 1bd3b1c0 Add change file on 2021-05-22
- Add
is_visible
getter onWindow
- Breaking change: New keyboard API, including
Accelerator
andGlobalShortcut
.
WindowEvent::ModifiersChanged
is emitted when a new keyboard modifier is pressed. This is your responsibility to keep a local state. When the modifier is released, ModifiersState::empty()
is emitted.
WindowEvent::KeyboardInput
as been refactored and is exposing the event KeyEvent
.
All menus (ContextMenu
and MenuBar
), now includes Accelerator
support on Windows, macOS and Linux.
New modules available: keyboard
, accelerator
and platform::global_shortcut
.
Please refer to the docs and examples for more details.
System tray now expose set_icon()
to update the tray icon after initialization. The system_tray::SystemTrayBuilder
has been moved to the root of the package as a module and available on Windows, Linux and macOS, only when the tray
feature is enabled. Windows expose a remove()
function available with SystemTrayExtWindows
.
Menu builder has been rebuilt from scratch, exposing 2 different types, ContextMenu
and MenuBar
.
Please refer to the docs and examples for more details.
- 7546dbd1 refactor: menu & tray (#77) on 2021-06-03
- Fix match branch of run loop observer on iOS.
- 4e9fede6 Add change file on 2021-05-23
-
skip_taskbar
is renamed toset_skip_taskbar
.
set_skip_taskbar
is now available onWindow
and is no longer behind a PlatformExt.set_skip_taskbar
takes a boolean to either show or hide the window icon from the taskbar.- Add
with_skip_taskbar
toWindowBuilder
. - c0aac091 add
with_skip_taskbar
on 2021-05-29 - Add
skip_taskbar
implementation for windows
- Add
is_decorated
getter onWindow
- 8237e2f3 add changefile on 2021-05-13
- Add
is_resizable
getter onWindow
- c87f3bf9 add changefile on 2021-05-13
- Fix panic from borrowing in event loop on linux.
- 12d7ccbc Fix event loop on linux on 2021-05-17
- Implement
set_focus()
andwith_focus()
for macOS, Windows and Linux.- 448e4c17 Add change file on 2021-05-07
- Fix Priority import on Linux.
- 20128896 Add change file on 2021-05-17
- Refactor control flow implementation to wait.
- f5514f04 Add change file on 2021-05-15
- Split feature flags (menu and tray).
- 0035ac31 Add changefile on 2021-05-10
- Add dox flag to skip link lib when building doc.
- 565114c1 Add dox flag on 2021-05-09
- Update covector script to fix doc build.
- 25f291f2 Update covector script to fix doc build on 2021-05-09
- Update README and bump version.
- 324eca05 Update README.md on 2021-05-08
- Implement menu item varients for Linux.
- 0637570f Add change file on 2021-05-06
- Implement status bar on Linux.
- Implement basic menu builder for macOS, Windows and Linux.
- Add menu feature flag and rename status bar to system tray.
- 06d95ad0 Cargo fmt & clippy on 2021-05-08
- Implement basic menu builder for macOS, Windows and Linux.