You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I would love to have my wezterm window on top of other windows.
Describe the solution you'd like
This can be done in Swift via:
window.level =.floating
After a small search on github and cocoa crate repo i figure out a possible solution, and tried it in the hello_world example of cocoa-foundation-rs/cocoa
// create Windowlet window = NSWindow::alloc(nil).initWithContentRect_styleMask_backing_defer_(NSRect::new(NSPoint::new(0.,0.),NSSize::new(200.,200.)),NSWindowStyleMask::NSTitledWindowMask,NSBackingStoreBuffered,NO,).autorelease();
window.setLevel_(1);// this is what we need
window.cascadeTopLeftFromPoint_(NSPoint::new(20.,20.));
window.center();
It would be super nice to have this option in the Window menu, something such as "Keep on top" or "Floating Window".
I wanted to open a PR for this but I'm not familiar with the codebase and I'm not sure where this should be added. If you can provide some indications I can try implementing this myself and open a PR :)
Describe alternatives you've considered
not implementing
After a bit of investigation and some experiments looks like setLevel_ accepts an i64 that is not binded to the NSWindow.level or CGWindowLevelKey value. However 0 is for normal window, 1 is floating.
rawnly
changed the title
Allow floating window level on macos
top level (floating) window on macos
Nov 19, 2023
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Is your feature request related to a problem? Please describe.
I would love to have my wezterm window on top of other windows.
Describe the solution you'd like
This can be done in Swift via:
After a small search on github and cocoa crate repo i figure out a possible solution, and tried it in the
hello_world
example ofcocoa-foundation-rs/cocoa
It would be super nice to have this option in the
Window
menu, something such as "Keep on top" or "Floating Window".I wanted to open a PR for this but I'm not familiar with the codebase and I'm not sure where this should be added. If you can provide some indications I can try implementing this myself and open a PR :)
Describe alternatives you've considered
not implementing
Additional context
cocoa-rs
#setLevel_
documentationOfficial Apple
CGWindowLevelKey
documentationNSWindow.Level
documentationThe text was updated successfully, but these errors were encountered: