summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--0002-dont-delete-clipboard-data-after-focus-out.patch124
-rw-r--r--PKGBUILD7
3 files changed, 133 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a98eeca433ad..a3a721bbb820 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = firefox-wayland
pkgdesc = Standalone web browser from mozilla.org with Wayland support enabled
pkgver = 63.0.1
- pkgrel = 1
+ pkgrel = 2
url = https://www.mozilla.org/firefox/
arch = x86_64
license = MPL
@@ -52,10 +52,12 @@ pkgbase = firefox-wayland
options = !strip
source = hg+https://hg.mozilla.org/mozilla-unified#tag=FIREFOX_63_0_1_RELEASE
source = 0001-Keep-mozilla-release-building-with-newer-cbindgen-ve.patch
+ source = 0002-dont-delete-clipboard-data-after-focus-out.patch
source = firefox.desktop
source = firefox-symbolic.svg
sha256sums = SKIP
sha256sums = a1e523f830f28217e050991062358c91be254e21732a6391449a8c0e3e0de77f
+ sha256sums = 3f43a57857c0d130fd31f56086398b21b0a445364830e2ed3128db270196899f
sha256sums = 677e1bde4c6b3cff114345c211805c7c43085038ca0505718a11e96432e9811a
sha256sums = 9a1a572dc88014882d54ba2d3079a1cf5b28fa03c5976ed2cb763c93dabbd797
diff --git a/0002-dont-delete-clipboard-data-after-focus-out.patch b/0002-dont-delete-clipboard-data-after-focus-out.patch
new file mode 100644
index 000000000000..6755d7ee404a
--- /dev/null
+++ b/0002-dont-delete-clipboard-data-after-focus-out.patch
@@ -0,0 +1,124 @@
+diff --git a/widget/gtk/nsClipboardWayland.h b/widget/gtk/nsClipboardWayland.h
+--- a/widget/gtk/nsClipboardWayland.h
++++ b/widget/gtk/nsClipboardWayland.h
+@@ -125,10 +125,8 @@
+ void AddDragAndDropDataOffer(wl_data_offer *aWaylandDataOffer);
+ nsWaylandDragContext* GetDragContext();
+
+- void ClearClipboardDataOffers();
+ void ClearDragAndDropDataOffer();
+
+- void ConfigureKeyboard(wl_seat_capability caps);
+ void TransferFastTrackClipboard(int aClipboardRequestNumber,
+ GtkSelectionData *aSelectionData);
+
+diff --git a/widget/gtk/nsClipboardWayland.cpp b/widget/gtk/nsClipboardWayland.cpp
+--- a/widget/gtk/nsClipboardWayland.cpp
++++ b/widget/gtk/nsClipboardWayland.cpp
+@@ -525,15 +525,6 @@
+ }
+
+ void
+-nsRetrievalContextWayland::ClearClipboardDataOffers(void)
+-{
+- if (mClipboardOffer)
+- mClipboardOffer = nullptr;
+- if (mPrimaryOffer)
+- mPrimaryOffer = nullptr;
+-}
+-
+-void
+ nsRetrievalContextWayland::ClearDragAndDropDataOffer(void)
+ {
+ mDragContext = nullptr;
+@@ -716,81 +707,6 @@
+ return mPrimarySelectionDataDeviceManager != nullptr;
+ }
+
+-static void
+-keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard,
+- uint32_t format, int fd, uint32_t size)
+-{
+-}
+-
+-static void
+-keyboard_handle_enter(void *data, struct wl_keyboard *keyboard,
+- uint32_t serial, struct wl_surface *surface,
+- struct wl_array *keys)
+-{
+-}
+-
+-static void
+-keyboard_handle_leave(void *data, struct wl_keyboard *keyboard,
+- uint32_t serial, struct wl_surface *surface)
+-{
+- // We lost focus so our clipboard data are outdated
+- nsRetrievalContextWayland *context =
+- static_cast<nsRetrievalContextWayland*>(data);
+-
+- context->ClearClipboardDataOffers();
+-}
+-
+-static void
+-keyboard_handle_key(void *data, struct wl_keyboard *keyboard,
+- uint32_t serial, uint32_t time, uint32_t key,
+- uint32_t state)
+-{
+-}
+-
+-static void
+-keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard,
+- uint32_t serial, uint32_t mods_depressed,
+- uint32_t mods_latched, uint32_t mods_locked,
+- uint32_t group)
+-{
+-}
+-
+-static const struct wl_keyboard_listener keyboard_listener = {
+- keyboard_handle_keymap,
+- keyboard_handle_enter,
+- keyboard_handle_leave,
+- keyboard_handle_key,
+- keyboard_handle_modifiers,
+-};
+-
+-void
+-nsRetrievalContextWayland::ConfigureKeyboard(wl_seat_capability caps)
+-{
+- // ConfigureKeyboard() is called when wl_seat configuration is changed.
+- // We look for the keyboard only, get it when is't available and release it
+- // when it's lost (we don't have focus for instance).
+- if (caps & WL_SEAT_CAPABILITY_KEYBOARD) {
+- mKeyboard = wl_seat_get_keyboard(mSeat);
+- wl_keyboard_add_listener(mKeyboard, &keyboard_listener, this);
+- } else if (mKeyboard && !(caps & WL_SEAT_CAPABILITY_KEYBOARD)) {
+- wl_keyboard_destroy(mKeyboard);
+- mKeyboard = nullptr;
+- }
+-}
+-
+-static void
+-seat_handle_capabilities(void *data, struct wl_seat *seat,
+- unsigned int caps)
+-{
+- nsRetrievalContextWayland *context =
+- static_cast<nsRetrievalContextWayland*>(data);
+- context->ConfigureKeyboard((wl_seat_capability)caps);
+-}
+-
+-static const struct wl_seat_listener seat_listener = {
+- seat_handle_capabilities,
+-};
+-
+ void
+ nsRetrievalContextWayland::InitDataDeviceManager(wl_registry *registry,
+ uint32_t id,
+@@ -816,7 +732,6 @@
+ void *data)
+ {
+ mSeat = (wl_seat*)wl_registry_bind(registry, id, &wl_seat_interface, 1);
+- wl_seat_add_listener(mSeat, &seat_listener, data);
+ }
+
+ static void
+
diff --git a/PKGBUILD b/PKGBUILD
index 1176d7c0f724..6465d7fee6af 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=firefox-wayland
pkgver=63.0.1
-pkgrel=1
+pkgrel=2
pkgdesc="Standalone web browser from mozilla.org with Wayland support enabled"
arch=(x86_64)
license=(MPL GPL LGPL)
@@ -25,9 +25,11 @@ options=(!emptydirs !makeflags !strip)
_repo=https://hg.mozilla.org/mozilla-unified
source=("hg+$_repo#tag=FIREFOX_${pkgver//./_}_RELEASE"
0001-Keep-mozilla-release-building-with-newer-cbindgen-ve.patch
+ 0002-dont-delete-clipboard-data-after-focus-out.patch
firefox.desktop firefox-symbolic.svg)
sha256sums=('SKIP'
'a1e523f830f28217e050991062358c91be254e21732a6391449a8c0e3e0de77f'
+ '3f43a57857c0d130fd31f56086398b21b0a445364830e2ed3128db270196899f'
'677e1bde4c6b3cff114345c211805c7c43085038ca0505718a11e96432e9811a'
'9a1a572dc88014882d54ba2d3079a1cf5b28fa03c5976ed2cb763c93dabbd797')
@@ -49,6 +51,9 @@ prepare() {
# https://bugzilla.mozilla.org/show_bug.cgi?id=1503401
patch -Np1 -i ../0001-Keep-mozilla-release-building-with-newer-cbindgen-ve.patch
+
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1504689
+ patch -Np1 -i ../0002-dont-delete-clipboard-data-after-focus-out.patch
echo -n "$_google_api_key" >google-api-key
echo -n "$_mozilla_api_key" >mozilla-api-key