diff --git a/CHANGELOG.md b/CHANGELOG.md index 984772d..ad89b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to imajViewer are documented in this file. ## [Unreleased] +## [1.3.2] - 2026-08-28 + +### Fixed +- Window position/size persistence under Wayland — forces X11 backend (XWayland) when an X server is available + ## [1.3.1] - 2026-08-14 ### Fixed diff --git a/linux/runner/my_application.cc b/linux/runner/my_application.cc index ee9b52b..a0b5e18 100644 --- a/linux/runner/my_application.cc +++ b/linux/runner/my_application.cc @@ -150,6 +150,14 @@ static void my_application_class_init(MyApplicationClass* klass) { static void my_application_init(MyApplication* self) {} MyApplication* my_application_new() { + // GTK3 ignores gtk_window_move under Wayland (window opens centered). + // Force X11 backend when an X server is available (XWayland) so window + // position/size persistence works. + if (g_getenv("WAYLAND_DISPLAY") != nullptr && + g_getenv("DISPLAY") != nullptr) { + g_setenv("GDK_BACKEND", "x11", FALSE); + } + // Set the program name to the application ID, which helps various systems // like GTK and desktop environments map this running application to its // corresponding .desktop file. This ensures better integration by allowing diff --git a/pubspec.yaml b/pubspec.yaml index 373a652..a951d54 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: imajviewer description: "Ultra-lightweight image viewer for Linux and Windows." publish_to: 'none' -version: 1.3.1+6 +version: 1.3.2+7 msix_config: display_name: ImajViewer