- Implement "always on bottom" as contrary to "always on top".
- Fix calling android functions when package name contained escaped underscore.
- Add
Window::set_content_protectionfor 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_filterto 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, 100minimum 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_titletoSystemTrayandSystemTrayBuilderExtMacOS::with_titleto set the tray icon title on MacOS - Update
windows-rsto 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::Evalto evaluate an specific script. - Fix webview initialization scripts implementation on Android.
- Removed the webview logic from the Android glue.
- Implement
SystemTray::set_tooltipandSystemTrayBuilder::with_tooltipon Windows.
- Remove the NSStatusItem from the menu bar when the
SystemTrayinstance is dropped. - Fixes
Window::is_decoratedalways returningtrueon macOS. - Fix theme feature to support Darker theme on Linux.
- Add
Window::is_minimized(). - Implement
SystemTrayBuilder::with_tooltipandSystemTray::set_tooltipon macOS. - On Windows, fix a ghost window appearing occasionally when clicking the tray icon.
- Added
SystemTrayBuilder::with_idand theidfield toEvent::TrayEventfor better multitray support. - Hide the app indicator when dropping
SystemTrayon 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
EventLoopWindowTargetExtUnixfor methods to determine if the backend is x11 or wayland.
- On Linux, add
- On Linux, add
x11module for glutin internal use. This is basically just x11-dl, but winit secretly exports it. - On Linux, add
WindowBuilder::with_transparent_drawto 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-handleto0.5and addedWindow::raw_display_handleandEventLoopWindowTarget::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_returnfrom ever returning. - Fix maximizing window.
- On Windows, fix wrong fullscreen monitors being recognized when handling
WM_WINDOWPOSCHANGINGmessages - Fix global hide others shortcut.
- Fix window can't be hidden when maximized.
- On macOS,
WindowEvent::Resizedis now emitted inframeDidChangeinstead ofwindowDidResize. - On Linux, adds
SystemTrayBuilderExtLinux::with_temp_icon_dirwhich 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/tmpis shared with all users. - Do not emit the
ThemeChangedevent when the window theme is set and the system theme changes (the window keeps its theme in this scenario). - Remvoe
core-video-sysdependency. - The
themefunction nowTheme::Lighton macOS older than 10.14 and the initial theme setter has no effect instead of crashing the application. - Reduce
WM_PAINTsingal on event target window to prevent from webview2 delay.
- Fixes the
Ivar menu_on_left_click not found on class TaoTrayHandlerpanic on macOS.- 2cc163d2 fix(macos): crash on tray class usage on 2022-06-14
- Fix macOS
SystemTrayExtMacOSimplementation.- f42c1be1 fix: fix wrong macOS trait implementation on 2022-06-14
- Breaking change
SystemTrayBuilder::newandSystemTray::set_iconnow takessystem_tray::Iconon 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
DragQueryFileWby passingstd::mem::transmute(path_buf.spare_capacity_mut())instead of&mut path_buf.
- Add standalone webview ndk port.
- Update the
windowscrate 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_monitorfunction 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::titlereturnd string. - On Windows and Linux, increase the resizing area for borderless windows based on scale factor.
- Implement
Window::set_cursor_positionfor Linux.
- Do not fire
WindowEvent::Movedwhenis_maximizedis called on macOS.
- Fixes compilation when only the
trayfeature is enabled.
- Add
EventLoopWindowTargetExtMacOS::set_activation_policy_at_runtime. - On Windows and Linux, disable resizing maximized borderless windows.
- Breaking change: Renamed the
ayatanaCargo feature toayatana-tray, now the default feature for tray on Linux, and added thegtk-trayfeature. - On Windows, Fix
Window::set_inner_sizesetting a bigger size than requested.
- Fire
Event::LoopDestroyedwhen the macOS dockQuitmenu item is clicked. - Added
Event::DecorationsClick(Windows only). - Enhance the
MenuItem::Aboutmenu 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::Destroyedon Linux when theWindowis 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::Destroyedon macOS when theWindowis dropped. - Fix inconsist behaviour when setting menu on mac.
- Fix a deadlock on Windows when using
Window::set_visible(true)in theEventLoop::runclosure. - On Windows, apply maximize state before minimize. Fixes
Window::set_minimizednot working when the window is maximized.
- Revert Global Shortcut fix on Linux. See #331 for more information.
- Fixes the
set_fullscreenimplementation on Linux when theFullscreen::Borderlessvalue 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:
,-.=;/\'`[]SpaceTabandF13-F24 - Increased Borderless window resizing inset.
- Update to 2021 edition and msrv to 1.56
- Breaking: Rename the
Exitvariant ofControlFlowtoExitWithCode, which holds a value to control the exit code after running. Add anExitconstant which aliases toExitWithCode(0)instead to avoid major breakage. This shouldn't affect most existing programs. - Fixes the
MenuItem::Quitbehavior on Windows. - Add support for
SPACEshortcut 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::ResizedandWindowEvent::Movedwhen 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
ColorSyncframework 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-handleto0.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
winapicrate references with thewindowscrate. The generated bindings are in thewebview2-com-syscrate to share types with WRY later. - Implement
CloneforEventLoopWindowTarget. - Update the
windowscrate to 0.25.0, which comes with pre-built libraries. Tao no longer depends onwebview2-com-systo generate bindings shared with WRY. - Update the
windowscrate to 0.29.0. - Update the
windowscrate 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_visibleandWindowBuilder::with_maximizednot behaving correctly. - On Windows, send correct position on system tray events.
- Add support for more accelerator keys:
,-.=;/\'`[]SpaceTabandF13-F24 - Allow more strings to parse to keycode, for example
,is now parsed as a comma. - Add macOS
show_application()method
- Fix missing
Synctrait on EventLoopProxy. This commit also introducescrossbeam-channelcrate which could also improve the performance.
- Remove feature flag that break doc builds
-
Move
global_shortcutmod to the lib root. -
Bump gtk-rs to version 0.14. This also introduces a new feature
ayatanafor developers to use updatedlibayatana-appindicatorsince the originallibappindicatoris 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 AcceleratorforSpace,Escape,MinusandEqualkeycode. -
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 whenSystemTrayis dropped. -
Add
MenuItem::SelectAllimplementation 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: falseaka borderless window. - Do not close the window on
CloseRequestedevent and let the user handle it, keeping compatibility with macOS and Windows behavior. - On Windows, fix Aero-Snap for
decorations: falseaka borderless window. - Implement
MonitorHandleand related methods on Linux. - Add
is_menu_visilbegetter onWindow - On macOS, make sure the
set_focusis triggered even if the window is not visible. - Fix
with_visible(bool)inWindowBuilderfor macOS. - Mark enums as
#[non_exhaustive]to prevent breaking changes on enum update. - Remove
with_focusandfocusfield inWindowAttribute. Useset_focusinstead in most cases. - Revert d344825 and move
set_skip_taskbarback behind aWindowExtWindowsandWindowExtUnix. SystemTrayexposeset_menuto 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_taskbarbehindWindowBuilderExtWindowsandWindowBuilderExtUnix.
- Add
window_idtoMenuEvent. - Prevent duplicate
MenuEventon window menu in Windows.
- Drop the event callback before exiting on macOS.
- Add
clipboardapi exposingread_textandwrite_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_visiblegetter onWindow - Breaking change: New keyboard API, including
AcceleratorandGlobalShortcut.
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_taskbaris renamed toset_skip_taskbar.
set_skip_taskbaris now available onWindowand is no longer behind a PlatformExt.set_skip_taskbartakes a boolean to either show or hide the window icon from the taskbar.- Add
with_skip_taskbartoWindowBuilder. - c0aac091 add
with_skip_taskbaron 2021-05-29 - Add
skip_taskbarimplementation for windows
- Add
is_decoratedgetter onWindow- 8237e2f3 add changefile on 2021-05-13
- Add
is_resizablegetter 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.