diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-13 13:36:46 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-13 13:36:46 +0100 |
commit | 7b02e37a04e4051a91a109814d386711f41f9a4b (patch) | |
tree | d0689f14f1d1df3a6a2525512a6812b146064a9e /media-gfx/shotwell/files/0.30.16-optional-wayland.patch | |
parent | 5c0c70d5917e66743293789a6d6fd7d72250eb32 (diff) |
gentoo auto-resync : 13:07:2022 - 13:36:46
Diffstat (limited to 'media-gfx/shotwell/files/0.30.16-optional-wayland.patch')
-rw-r--r-- | media-gfx/shotwell/files/0.30.16-optional-wayland.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/media-gfx/shotwell/files/0.30.16-optional-wayland.patch b/media-gfx/shotwell/files/0.30.16-optional-wayland.patch new file mode 100644 index 000000000000..5cc82e67dc7d --- /dev/null +++ b/media-gfx/shotwell/files/0.30.16-optional-wayland.patch @@ -0,0 +1,59 @@ +Make wayland backend optional + +* Unfortunately, upstream is hostile to making wayland optional: + https://gitlab.gnome.org/GNOME/shotwell/-/merge_requests/57#note_1500284 + +See: https://bugs.gentoo.org/836831 + +--- a/meson.build ++++ b/meson.build +@@ -64,7 +64,14 @@ + libraw = dependency('libraw', version : '>= 0.13.2') + libexif = dependency('libexif', version : '>= 0.6.16') + unity = dependency('unity', required : false) +-gdk = [ dependency('gdk-x11-3.0'), dependency('gdk-wayland-3.0') ] ++gdk = [ dependency('gdk-x11-3.0') ] ++add_global_arguments(['--define=HAVE_X11_BACKEND'], ++ language : 'vala') ++if get_option('wayland') ++ gdk += [dependency('gdk-wayland-3.0')] ++ add_global_arguments(['--define=HAVE_WAYLAND_BACKEND'], ++ language : 'vala') ++endif + + unity_available = false + if unity.found() and get_option('unity-support') +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -8,3 +8,4 @@ + option('install-apport-hook', type : 'boolean', value : 'true', description: 'Enable Ubuntu apport hook') + option('face-detection', type:'boolean', value:false, description: 'Enable face detection and recognition features') + option('fatal_warnings', type:'boolean', value:false) ++option('wayland', type: 'boolean', value: true, description: 'Enable Wayland support') +--- a/src/Portal.vala ++++ b/src/Portal.vala +@@ -53,6 +53,7 @@ + private static async string get_parent_window () { + var window = AppWindow.get_instance().get_window (); + ++#if HAVE_WAYLAND_BACKEND + if (window is Gdk.Wayland.Window) { + var handle = "wayland:"; + ((Gdk.Wayland.Window) window).export_handle ((w, h) => { +@@ -61,9 +62,14 @@ + }); + yield; + return handle; +- } else if (window is Gdk.X11.Window) { ++ } else ++#endif ++#if HAVE_X11_BACKEND ++ if (window is Gdk.X11.Window) { + return "x11:%x".printf ((uint) ((Gdk.X11.Window) window).get_xid ()); +- } else { ++ } else ++#endif ++ { + warning ("Could not get parent window"); + return ""; + } |