This PR implements #26324, i.e. support for saving and restoring window geometry using Wayland XDG session management protocol.
It requires very new GTK (later than the last released 3.24.52) both at compile- and run-time and, for Gnome users, very new Mutter (51.alpha).
There is no support for detecting this in CMake yet but I'll add it soon (maybe by just checking for GTK 3.24.53 as the current configure checks will become unnecessary as soon as this version is released).
https://github.com/wxWidgets/wxWidgets/pull/26793
(12 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@vadz pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@vadz pushed 2 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@MaartenBent Please let me know if you see anything wrong with my CMake changes, TIA!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@MaartenBent commented on this pull request.
> + )
+
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${wx_protocols_temp_dir}/${protocol}-client-protocol.h
+ ${wx_protocols_temp_dir}/${protocol}-client-protocol.c
+ ${wx_protocols_output_dir}
+ )
+ endfunction()
+
+ wx_generate_wayland_protocol(${wx_protocols_input_dir} pointer-warp-v1)
+
+ # Check if we have GTK new enough to allow using XDG
+ # session management protocol: 3.24.53 is the earliest one
+ # with gdk_wayland_window_get_xdg_toplevel() that we need.
+ if(${GTK3_VERSION} VERSION_GREATER_EQUAL 3.24.53)
⬇️ Suggested change
- if(${GTK3_VERSION} VERSION_GREATER_EQUAL 3.24.53)
+ if(GTK3_VERSION VERSION_GREATER_EQUAL 3.24.53)
Better to remove the reference so it doesn't error if the variable doesn't exist (which could happen when testing gtk4?).
Another approach is to wrap it in quotes ("${GTK3_VERSION}") so it compares against an empty string if the variable doesn't exist.
The rest looks fine. Maybe when Ubuntu 27.04 releases I'll see if it works :)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@vadz pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@vadz commented on this pull request.
> + )
+
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${wx_protocols_temp_dir}/${protocol}-client-protocol.h
+ ${wx_protocols_temp_dir}/${protocol}-client-protocol.c
+ ${wx_protocols_output_dir}
+ )
+ endfunction()
+
+ wx_generate_wayland_protocol(${wx_protocols_input_dir} pointer-warp-v1)
+
+ # Check if we have GTK new enough to allow using XDG
+ # session management protocol: 3.24.53 is the earliest one
+ # with gdk_wayland_window_get_xdg_toplevel() that we need.
+ if(${GTK3_VERSION} VERSION_GREATER_EQUAL 3.24.53)
Better to remove the reference so it doesn't error if the variable doesn't exist
Thanks, I forgot about this charming CMake peculiarity again (not for the first time).
Updated now and also added a warning as I've realized it might be surprising that support for this protocol is not available even with new enough GTK.
The rest looks fine. Maybe when Ubuntu 27.04 releases I'll see if it works :)
Fedora seems to be the only distribution that has recent stuff :-( Luckily, it can be installed in toolbox.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()