-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override redirect Option for window configuration #6482
Comments
I think you should be able to use gtk's method https://docs.gtk.org/gdk3/method.Window.set_override_redirect.html for this in Rust. Something like this maybe use tauri::Manager;
use gtk::prelude::WidgetExt;
fn main() {
tauri::Builder::default()
.setup(|app| {
let window = app.get_window("main").unwrap();
let gtk_window = window.gtk_window()?;
if let Some(gdk_window) = gtk_window.window() {
gdk_window.set_override_redirect(true);
}
Ok(())
})
.run(tauri::generate_context!())
.unwrap();
} Well, at least i hope so, i don't have access to a linux machine over the weekend so i can't check 😅 If it doesn't work, tauri's |
This does not seem to work.
|
afaik x11 window managers check override redirect when creating a window. So you'd need to set it before the window is drawn to the screen. |
Describe the problem
Support for forcing position and size outside the context of window manager
Applications like rofi / dmenu / launcy / alfred / wox, etc uses something called as override-redirect to make them appear at the middle (or some specific location) on the screen bypassing the interference of the window-manager and other utilities.
(PS: We can also start rofi as normal window with rofi -normal-window to see the difference)
It allows them to draw custom popup menu anywhere on the screen, including on tiling window managers, on their own decision.
It is very useful for applications including:
Is there support for this in tauri already, or can there be support for this? I would like to make a few applications on this purpose, and finding it difficult to find a good fit framework instead of going system-specific library for each platform...
-> Original issue -> slint-ui/slint#2289
Describe the solution you'd like
I read the
https://tauri.app/v1/api/config#windowconfig
Window config docs for tauri and there was no parameter which can bring the window outside of the window manager contextAlternatives considered
Some way to force position and size of the window outside the context of a window manager across platforms.
Additional context
No response
The text was updated successfully, but these errors were encountered: