-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[bug] Can't move or resize the main window #10686
Comments
I got the same promble, with the newest RC version. My system information is "Manjaro Arch24 with gnome+wayland". |
I found some special things, I install the gtk3 library(pacman -S gtk3 in the "tao" doc),now I can move the window in the "dev" option, but I still can't move the windows in "build" option. |
I did something more, I found that if I right-click the botton on the titile bar, I can move it. |
The issue might come from Also, both minimize and close buttons work and I can move the window when "dragging" them.
|
so that we should tell it to the "wry" project. I'm not good at the cases, can you please donging some tests and tell them? |
It also happens in release mode. KDE + X11 -> Can resize and move |
Can confirm this bug on Fedora Workstation 40. |
Same here. I can move the window if I grab it by minimize/maximize/close button. Debian sid. Gnome wayland. [✔] Environment [-] Packages [-] Plugins [-] App I found out that window example in tao doesn't allow to move/resize window either, but in drag_window example it is possible to move windows (but not resize - it's the example's purpose to show how to make window movable by holding on edges). |
As you tell. I also found that you can hold down three buttons, such as the minimize button, to move the window. |
It seems to me that this problem is caused by Ubuntu on Wayland and nothing we can do to fix this on our side since we simply use GTK3 to create the window and it handles resizing on it self. If there is other GTK3 apps (non-tauri) that exhibits this behavior, then it is probably a bug in Ubuntu on Wayland. |
same issue here on debain 12, when I run
|
using xprop method of detecting if application is running native wayland or thru xwayland (shows crosshair on xwayland and no cursor change on wayland). I have found out:
This suggests that the problem is in tauri/tao/wry and not in the system. My current workaround is setting env var "GDK_BACKEND" to x11 at top of the main() function. p.s. beware of running your app from vs code terminal as it sets GDK_BACKEND to x11 |
Thanks @akrpic77 for the investigation, I will see if I we are doing something finky in our code once I get my linux machine setup. I still don't understand why would KDE+Wayland work but not Gnome+Wayland. |
I have built a release .deb and .AppImage. the .AppImage works fine with resizing and moving, since it shipped with all dependencies and does not use any system libs. |
The appimage also forces |
I've gone through and tried all |
following on hint by @ndom91, I found out that reversing changes of fix(linux): prevent firing duplicate mouse events in tao fixes move/size issue, but brings back duplicate mouse events. |
I think this is relevant, because I managed to move the window one time by holding the click for some time. But I did not know how to produce it again. |
based on all the comments above, this is the hacky fix I have, which seems to work. If you have a better solution, please share :) if env::var("APPIMAGE").is_ok() || std::env::var("FLATPAK_ID").is_ok() {
return;
}
let desktop = env::var("XDG_CURRENT_DESKTOP").unwrap_or_default().to_lowercase();
if desktop.contains("gnome") {
env::set_var("GDK_BACKEND", "x11");
} |
* Force X11 backend on GNOME + Wayland to work around a Tauri/WRY bug: tauri-apps/tauri#10686
* Force X11 backend on GNOME + Wayland to work around a Tauri/WRY bug: tauri-apps/tauri#10686
Tauri 2 includes the ability to pass a .desktop file template for deb and rpm. So we decided to do something similar ^^ and prefix |
Using the X11 backend is not a solution, it is a hack. I hope this can be fixed in TAO. |
Right, but it's a workaround for now for folks that made the migration to Tauri v2 already and don't want to go back |
This issue is blocking me from releasing my app (the app is not usable). Are we expecting a fix in the upcoming releases? |
@Khalid-Nowaf I have implemented a header for Wayland, and it will be included in the next version once tauri-apps/tao#982 is released. |
Closed by tauri-apps/tao#979, if the issue happens after release, please let me know |
I'm still getting this in my app OpenDeck after updating to the stable release. Edit: it's the same behaviour, I'm on GNOME + Wayland, and I can move the window by dragging the decoration buttons, and can't resize. |
@ninjadev64 apologies, we forgot to release the |
@amrbashir i tested the new release and that's not really a solution. The custom header has 2 serious problems:
Please, reopen this bug report until a proper fix is implemented. |
In my opinion, this is a separate issue. There was already a problem with the window not being created accurately even before the custom header. see: tauri-apps/tao#929 |
@Zamoca42 I didn't note that when using the RC versions that still had the bug (and the native headerbar?). Anyway the current situation under Linux/Wayland is terrible. |
Seems to be fixed, thanks. |
Describe the bug
I can't move or resize a window after upgrading to tauri latest rc (
2.0.0-rc.3
at that time) when running as dev.The thing is it doesn't come from that tauri version as downgrading it doesn't solve the problem.
Reproduction
Create a minimal tauri app using the latest release candidate.
cargo create-tauri-app --rc
Run the app in dev mode.
cargo tauri dev
Expected behavior
Be able to move or resize the application's window.
Full
tauri info
outputStack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: