e67cf1b2
(#941 by @Sanae6) Prevent duplicate mouse press, release, and motion events from firing on Linux (fixes #939)b7dab732
(#947 by @muwoo) FixWindow::request_user_attention
not taking effect after minimizing the window by clicking the taskbar iconf54cc11e
(#938 by @andrewbaxter) AddEventLoopWindowTargetExtUnix::gtk_app
getter.- `` Return a new
BadIcon::DimensionsZero
error variant inIcon::from_rgba
if one of the passed icon dimensions is zero. 80e10084
(#954 by @amrbashir) Return a newBadIcon::DimensionsZero
error variant inIcon::from_rgba
if one of the passed icon dimensions is zero.80e10084
(#954 by @amrbashir) Return a newBadIcon::DimensionsMultiplyOverflow
error variant inIcon::from_rgba
if dimensions multiplication overflowed.f5756196
(#956 by @MarijnS95) Breaking change: Upgradendk
crate to0.9
andndk-sys
crate to0.6
. Types from thendk
crate are used in public API surface. Breaking change: ChangeNativeKeyCode::Android(u32)
type to usei32
, which is the native type used by all Android API. Breaking change: Thesetup
function passed toandroid_binding!()
must now take a&ThreadLooper
instead of&ForeignLooper
, matching thewry
change in tauri-apps/wry#1296.f54cc11e
(#938 by @andrewbaxter) AddWindowExtUnix::new_from_gtk_window
.
7e8f75e9
(#926 by @pewsheen) On macOS, addset_fullsize_content_view
andset_titlebar_transparent
toWindow
to set the title bar style.3bbddc64
(#931 by @muwoo) Breaking Change: On Windows,UserAttentionType::Informational
will flash the taskbar icon 4 times only and not until the app recieves focus.29bee151
(#935 by @renovate) Updatewindows
crate to0.57
ab792dbd
(#928 by @amrbashir) On Windows, always allow dark theme for app and window throughAllowDarkModeForApp
andAllowDarkModeForWindow
, which fixes an issue when callingIsDarkModeAllowedForWindow()
cd38f237
(#912) AddEventLoopBuilderExtUnix::with_app_id
on Linux to allow setting a unique app id for the underlying gtk application.2d6ad2de
(#923) Fix unwanted deviation when dragging window around monitor boundaries on macOS.f06843be
(#517) Addevent::Reopen
for handle click on dock icon on macOS.
9ef1379f
(#901) On macOS, fix an issue where the set minimize maximize and close buttons would interfere with each other.5af059b1
(#909) Updatewindows
crate to0.56
-
c2357732
(#896) Replaceddpi
module with a re-export of thedpi
crate which has a few breaking changes:- Replaced
LogicalPixel
withLogicalUnit
- Replaced
PhysicalPixel
withPhysicalUnit
- Removed
Size::width
,Size::height
,Position::x
,Position::y
andPixelUnit::value
.
- Replaced
2af91313
(#880) Updated the minimum supported Rust version to 1.70.90ad07b3
(#878) Breaking change: Removedwindow::hit_test
function.2af91313
(#880) Progress bar on Linux no longer relies on zbus. ChangedProgressBarState
's fieldunity_uri
todesktop_filename
.90ad07b3
(#878) On Windows and Linux, disable resizing undecorated windows when in fullscreen.90ad07b3
(#878) On Windows, fix undecorated window resizing.89ce9d26
(#874) On Windows, applyScaleFactorChanged
if new size is different than what OS reported. This fixes an issue when moving the window to another monitor and immediately maximizing it, resulting in a maximized window (i.e haveWS_MAXIMIZE
window style) but doesn't cover the monitor work area.
ae4b693d
(#864) On Windows, RemoveWS_CAPTION
andWS_EX_WINDOWEDGE
window styles when creating a child window.e10f6a68
(#862) Breaking Change: ChangedWindowBuilderExtUnix::with_transient_for
signature to take&impl gtk::glib::IsA<gtk::Window>
instead ofgtk::ApplicationWindow
which covers more gtk window types and matches the underlying API call signature.
25a8836b
(#860) Fix the app crash on restart due to Android context was not released. Release the Android context when the app is destroyed to avoid assertion failure.5eb2124e
(#852) Enable macOS secure state restoration on OS versions that support it. This avoids 'WARNING: Secure coding is not enabled for restorable state!' on macOS Sonoma.f0bf850f
(#859) DeriveDebug, Copy, Clone, PartialEq, Eq, Hash
forResizeDirection
.29b01bff
(#849) On Windows, removeSetWindowTheme
call withDarkMode_Explorer
theme which fixes a glitch downstream inmuda
crate when manually drawing the menu bar.60bbcac1
(#858) On Windows, fix when theShow window contents while dragging
setting is turned off in Windows, there is a window size issue when dragging between multi-monitors with different scaling.68803e67
(#854) On Windows, fix consecutive calls towindow.set_fullscreen(Some(Fullscreen::Borderless(None)))
resulting in losing previous window state when eventually exiting fullscreen usingwindow.set_fullscreen(None)
.
-
43c94f0b
(#830) This patch contains a couple of changes to how the anroid macros:- Changed
android_binding
macro 4th argument signature, which is a setup function that is called once when the event loop is first created, fromunsafe fn(JNIEnv, &ForeignLooper, GlobalRef)
tounsafe fn(&str, JNIEnv, &ForeignLooper, GlobalRef)
. - Moved
android_fn!
andgenerate_package_name
macro from crate rootplatform::android::prelude
- Changed
-
f497b5dc
(#829) AddWindow::drag_resize_window
andResizeDirection
enum to initialize window resizing. Supported on Windows and Linux only. -
28b53f80
(#705) FixWindow::primary_monitor
panicking on Linux when there is no primary monitor, e.g. with Wayland. -
e33104c2
(#831) On macOS, fixWindowEvent::Destroyed
may fire twice. -
853101be
(#821) This release includes an update toraw-window-handle
crate to0.6
but will also provide a feature flags to select whichraw-window-handle
to use:rwh_06
(default):[email protected]
rwh_05:
[email protected]`rwh_04:
[email protected]`
-
fce9d260
(#844) On Windows, fixWindowBuilder::with_theme
has no effect when forcing light theme on a dark mode system. -
c0278d83
(#839) On Windows, removeWS_CLIPCHILDREN
from window style
cf22c902
(#85) Breaking change: Removed clipboard implementation. Usearboard
crate instead.081ba16a
(#800) FixWindow::theme
may return a theme different from the actual window's theme on Linux.32ce759e
(#801) Updated to gtk 0.18 and Bump MSRV to 1.70.0.f569bbab
(#815) FixWindow::current_monitor
sometimes panicking on Linux when the window is invisible.7e854cb1
(#817) On Windows, fix incorrect delta reported forDeviceEvent::MouseWheel
event.7e854cb1
(#817) On Windows, fixWindow::set_progress_bar
incorrect states.7e854cb1
(#817) Updatewindows
andwindows-implement
crate to0.51
6df56c2d
(#751) On Windows, apply dark mode app-wide to some controls like context menus.6df56c2d
(#751) On Windows, addEventLoopBuilderExtWindows::with_theme
to control the app-wide theme.
-
d0b20c94
(#778) This release contains a number of breaking changes that aimed at removing menus, system-tray and global-shortcuts features which have been moved to different crates,muda
,tray-icon
andglobal-hotkey
and here is a summary of the changes:- Removed
tray
crago feature flag. - Removed
accelerator
,menu
,system_tray
andglobal_shortcut
modules and all associated types. - Removed
Event::MenuEvent
,Event::TrayEvent
,Event::GlobalShortcutEvent
,TrayEvent
andRectangle
types. - Added
EventLoopBuilder
type. - Removed
EventLoop::with_user_event
, instead useEventLoopBuilder::<T>::with_user_event().build()
. - Removed
EventLoopExtWindows
,EventLoopExtMacOS
andEventLoopExtUnix
, instead useEventLoopBuilderExtWindows
,EventLoopBuilderExtMacOS
andEventLoopBuilderExtUnix
. - Changed
WindowExtWindows::hinstance
,WindowExtWindows::hwnd
andMonitorHandleExtWindow::hmonitor
to returnisize
instead of*const c_void
- Removed
9a320882
(#761) On Android, use a lockfree queue (crossbeam channel) to prevent deadlocks inside send_event.b31cb692
(#772) On macOS, fixWindowExtMacOS::ns_view
returning an invalid pointer if the view was replaced by a call tosetContentView
later on.4d0e1862
(#762) AddWindowExtWindows::set_rtl
andWindowBuilderExtWindows::with_rtl
to set right-to-left layout on Windows.75eb0c1e
(#769) AddWindowBuilderExtWindows::with_window_classname
to set the name of the window class created/used to create windows.494e4585
(#775) Ensure the macOS app delegate is defined before accessing it.
81329013
(#743) On macOS, fix the unexpected shifting of the window when dragging after closing the share dialog.baa02977
(#418) Added APIs for setting progress bars for the application icon on Linux (Unity only) and macOS, along with progress indicator for specific window on Windows.8f361f0c
(#752) Handle universal links on iOS and sendEvent::Opened { urls }
.bb3c53d1
(#764) On macOS, fixSystemTrayEvent
not emitted after callingset_menu
.5af3da4a
(#746) On macOS, forceNativeImage
height to be18
to have consistent size for all icons and match custom icons.093d8fbc
(#422) ImplementEvent::Opened
on macOS for file association and deeplink support.e9875fe5
(#755) On Windows, fix leak oftao::system_tray::Icon
when callingtao::system_tray::SystemTray::set_icon
and leak ofString
when callingtao::system_tray::SystemTray::set_tooltip
.50e69d71
(#749) On Windows, fix disablingresizable
also disabling maximize button and messing upWindow::set_maximized
.
c6082173
(#731) Fix build error on target i686-pc-windows-msvc90ce80cd
(#732) Enable shadows by default for undecorated window on Windows.
- On Windows, fix auto-hide taskbar can't be shown when maximizing undecorated window.
- On Linux, fix
ShortcutManager::unregister_all
makingShortcutManager::register
succeed but no events are triggered. - On macOS, fix window frozed when starting with fullscreen.
- Breaking change: All ow specifying the android activity in
android_binding
macro, instead of hard-codedTauriActivity
. - Fix set_focus not working on Windows in some situations like interactive notifications.
- On macOS, fix wry window will crash if unfocused.
- fix not get actual ns_view when it's replace by setContentView
- Fix
Window::cursor_position
andEventLoopWindowTarget::cursor_position
scale on Linux and macOS. - On macOS, Fix
cursor_position
return incorrect position. - Fix arrow cursor icon on Linux
- e9eba855 chore: rename change file on 2023-02-22
- Attempt to get primary monitor on linux will now return None rather than panicking if monitor not found.
- On macOS, Remove linking to
ColorSync
- Retain NSMenu reference instead of autoreleasing it.
- Fix undecorated window shadow enabled by default on Windows.
- On Linux, Add wayland raw handle methods. (#685)
- Update
windows-rs
to0.44
which bumps the MSRV of this crate on Windows to1.64
.
- Bump gtk version: 0.15 -> 0.16
- Add
Window::cursor_position
andEventLoopWindowTarget::cursor_position
to get the current mouse position. - On Linux, spawn device event thread only once instead of a new thread on each iteration of the event loop.
- On Windows, fix
Window::set_minimized(false)
not working when the window was minimized usingWin + D
hotkey.
- 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.