Open Arfrever opened 2 years ago
GdkX11 is needed for IBUS_SETUP_XID environment variable which is used by each engine setup dialog to make the modal dialog between different PIDs. gnome-control-center also exports GNOME_CONTROL_CENTER_XID between g-c-c and engine setup dialog. https://wiki.gnome.org/AllanDay/IMEGuidelines
Probably we cannot get window IDs of the different PIDs in Wayland so we could just skip the code.
GNOME Control Center (GTK 4 app) supports that on Wayland too. Though it needs two separate code paths:
The child process then also needs to handle both backends separately:
So it would appear that names of some Wayland-specific functions are:
gdk_wayland_window_export_handle
gdk_wayland_window_unexport_handle
gdk_wayland_window_set_transient_for_exported
gdk_wayland_toplevel_export_handle
gdk_wayland_toplevel_unexport_handle
gdk_wayland_toplevel_set_transient_for_exported
GdkWayland.WaylandToplevel.export_handle
GdkWayland.WaylandToplevel.unexport_handle
GdkWayland.WaylandToplevel.set_transient_for_exported
And when ibus-setup is ported to GTK 4, doing the desired thing in Wayland environment may be possible...
https://github.com/ibus/ibus/blob/e465011b48cbaca4f18a65cf7b23a1035cf6b105/setup/main.py#L45
Usage of
GdkX11
is scarce, only in one function. Maybe it is possible to work withoutGdkX11
available, e.g. by skipping some code. GTK 4 (#2373) provides introspection modulesGdkWayland
andGdkX11
, but it is not clear to me if the equivalent functionality is provided byGdkWayland
.