fix: window position/size persistence under Wayland (v1.3.2)
This commit is contained in:
1 parent
1002156cd4
commit
73c1ff51d6
3 files changed
+14
-1
No files matched your search
@@ -4,6 +4,11 @@ All notable changes to imajViewer are documented in this file.
|
|||||||
|
|
||||||
## [Unreleased]
|
## [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
|
## [1.3.1] - 2026-08-14
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -150,6 +150,14 @@ static void my_application_class_init(MyApplicationClass* klass) {
|
|||||||
static void my_application_init(MyApplication* self) {}
|
static void my_application_init(MyApplication* self) {}
|
||||||
|
|
||||||
MyApplication* my_application_new() {
|
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
|
// Set the program name to the application ID, which helps various systems
|
||||||
// like GTK and desktop environments map this running application to its
|
// like GTK and desktop environments map this running application to its
|
||||||
// corresponding .desktop file. This ensures better integration by allowing
|
// corresponding .desktop file. This ensures better integration by allowing
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
name: imajviewer
|
name: imajviewer
|
||||||
description: "Ultra-lightweight image viewer for Linux and Windows."
|
description: "Ultra-lightweight image viewer for Linux and Windows."
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 1.3.1+6
|
version: 1.3.2+7
|
||||||
|
|
||||||
msix_config:
|
msix_config:
|
||||||
display_name: ImajViewer
|
display_name: ImajViewer
|
||||||
|
|||||||
Reference in new issue
Block a user