summaryrefslogtreecommitdiffstats
path: root/winit
diff options
context:
space:
mode:
authorLibravatar Tom <twitchyliquid64@ciphersink.net>2020-09-28 21:05:15 -0700
committerLibravatar Tom <twitchyliquid64@ciphersink.net>2020-09-28 21:05:15 -0700
commitf2247a70dc791536e2acc26c6e928c89a38a4a95 (patch)
tree406b3b01eba0e3dabb13ac58915e11c08c75b3df /winit
parent4f2962d73f3bdeeca8a11817e404c45e91e2c2cc (diff)
downloadiced-f2247a70dc791536e2acc26c6e928c89a38a4a95.tar.gz
iced-f2247a70dc791536e2acc26c6e928c89a38a4a95.tar.bz2
iced-f2247a70dc791536e2acc26c6e928c89a38a4a95.zip
Fixes #539: Allow windows to be set always_on_top
Diffstat (limited to 'winit')
-rw-r--r--winit/src/settings.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/winit/src/settings.rs b/winit/src/settings.rs
index 92541e7d..e0d2c569 100644
--- a/winit/src/settings.rs
+++ b/winit/src/settings.rs
@@ -45,9 +45,12 @@ pub struct Window {
/// Whether the window should have a border, a title bar, etc.
pub decorations: bool,
- /// Whether the window should be transparent
+ /// Whether the window should be transparent.
pub transparent: bool,
+ /// Whether the window will always be on top of other windows.
+ pub always_on_top: bool,
+
/// The window icon, which is also usually used in the taskbar
pub icon: Option<winit::window::Icon>,
@@ -74,6 +77,7 @@ impl Window {
.with_decorations(self.decorations)
.with_transparent(self.transparent)
.with_window_icon(self.icon)
+ .with_always_on_top(self.always_on_top)
.with_fullscreen(conversion::fullscreen(primary_monitor, mode));
if let Some((width, height)) = self.min_size {
@@ -108,6 +112,7 @@ impl Default for Window {
resizable: true,
decorations: true,
transparent: false,
+ always_on_top: false,
icon: None,
platform_specific: Default::default(),
}