diff --git a/0001-Resolves-rhbz-1326304-cannot-detect-loss-of-wayland-.patch b/0001-Resolves-rhbz-1326304-cannot-detect-loss-of-wayland-.patch index 9855f1e..eefb5f4 100644 --- a/0001-Resolves-rhbz-1326304-cannot-detect-loss-of-wayland-.patch +++ b/0001-Resolves-rhbz-1326304-cannot-detect-loss-of-wayland-.patch @@ -1,4 +1,4 @@ -From fb71db9506d73a8a14c3fd888bdea7778def7cc0 Mon Sep 17 00:00:00 2001 +From 3af38da4f0cb6b6341efad280c73a7733de42bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 24 Jun 2016 15:06:36 +0100 Subject: [PATCH] Resolves: rhbz#1326304 cannot detect loss of wayland @@ -23,8 +23,6 @@ its "paste"->m_aSystemContents->gtk->"copy"->m_aOurContents Undoubtedly something else will break now -(cherry picked from commit 88cd9dd591d7921e5bce33c170b457ae5aa871bb) - Change-Id: I32f2e1a2cc3310687f61a094fdfa940fa0cfcc39 Resolves: rhbz#1350478 identify that we own the selection with a unique target @@ -47,14 +45,14 @@ didn't work. Change-Id: I1154899e478b6e0cc6f70aa0c90c26663299072c (cherry picked from commit 88f7aae022bedd61588424a11bbc033217ba4e43) --- - vcl/unx/gtk3/gtk3gtkinst.cxx | 127 +++++++++++++++++++++---------------------- - 1 file changed, 63 insertions(+), 64 deletions(-) + vcl/unx/gtk3/gtk3gtkinst.cxx | 124 ++++++++++++++++++++++--------------------- + 1 file changed, 63 insertions(+), 61 deletions(-) diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx -index 06a5427..25f4590 100644 +index ed64ded..8b01166 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx -@@ -238,50 +238,6 @@ public: +@@ -238,47 +238,6 @@ public: } }; @@ -64,10 +62,7 @@ index 06a5427..25f4590 100644 -//one here for that purpose and just give it a VclGtkClipboard* member -class VclGtkClipboard; - --typedef struct _ClipboardOwner ClipboardOwner; --typedef struct _ClipboardOwnerClass ClipboardOwnerClass; -- --struct _ClipboardOwner +-struct ClipboardOwner -{ - GObject parent_instance; - @@ -75,7 +70,7 @@ index 06a5427..25f4590 100644 - VclGtkClipboard* m_pThis; -}; - --struct _ClipboardOwnerClass +-struct ClipboardOwnerClass -{ - GObjectClass parent_class; - @@ -105,7 +100,7 @@ index 06a5427..25f4590 100644 class VclGtkClipboard : public cppu::WeakComponentImplHelper< datatransfer::clipboard::XSystemClipboard, -@@ -290,7 +246,6 @@ class VclGtkClipboard : +@@ -287,7 +246,6 @@ class VclGtkClipboard : { GdkAtom m_nSelection; osl::Mutex m_aMutex; @@ -113,7 +108,7 @@ index 06a5427..25f4590 100644 gulong m_nOwnerChangedSignalId; Reference m_aContents; Reference m_aOwner; -@@ -352,7 +307,7 @@ public: +@@ -349,7 +307,7 @@ public: void ClipboardGet(GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info); void ClipboardClear(GtkClipboard *clipboard); @@ -122,7 +117,7 @@ index 06a5427..25f4590 100644 }; OUString VclGtkClipboard::getImplementationName() throw( RuntimeException, std::exception ) -@@ -373,13 +328,13 @@ sal_Bool VclGtkClipboard::supportsService( const OUString& ServiceName ) throw( +@@ -370,13 +328,13 @@ sal_Bool VclGtkClipboard::supportsService( const OUString& ServiceName ) throw( Reference< css::datatransfer::XTransferable > VclGtkClipboard::getContents() throw( RuntimeException, std::exception ) { @@ -138,14 +133,13 @@ index 06a5427..25f4590 100644 return m_aContents; } -@@ -391,9 +346,55 @@ void VclGtkClipboard::ClipboardGet(GtkClipboard* /*clipboard*/, GtkSelectionData +@@ -388,9 +346,55 @@ void VclGtkClipboard::ClipboardGet(GtkClipboard* /*clipboard*/, GtkSelectionData m_aConversionHelper.setSelectionData(m_aContents, selection_data, info); } -void VclGtkClipboard::OwnerChanged(GtkClipboard* clipboard, GdkEvent* /*event*/) +namespace - { -- if (G_OBJECT(m_pOwner) != gtk_clipboard_get_owner(clipboard)) ++{ + const OString& getPID() + { + static OString sPID; @@ -163,7 +157,8 @@ index 06a5427..25f4590 100644 +} + +void VclGtkClipboard::OwnerPossiblyChanged(GtkClipboard* clipboard, GdkEvent* /*event*/) -+{ + { +- if (G_OBJECT(m_pOwner) != gtk_clipboard_get_owner(clipboard)) + if (!m_aContents.is()) + return; + @@ -196,7 +191,7 @@ index 06a5427..25f4590 100644 { //null out m_aContents to return control to the system-one which //will be retrieved if getContents is called again -@@ -491,20 +492,20 @@ namespace +@@ -488,20 +492,20 @@ namespace guint info, gpointer user_data_or_owner) { @@ -220,7 +215,7 @@ index 06a5427..25f4590 100644 } } -@@ -517,8 +518,6 @@ VclGtkClipboard::VclGtkClipboard(GdkAtom nSelection) +@@ -514,8 +518,6 @@ VclGtkClipboard::VclGtkClipboard(GdkAtom nSelection) GtkClipboard* clipboard = gtk_clipboard_get(m_nSelection); m_nOwnerChangedSignalId = g_signal_connect(clipboard, "owner-change", G_CALLBACK(handle_owner_change), this); @@ -229,7 +224,7 @@ index 06a5427..25f4590 100644 } void VclGtkClipboard::flushClipboard() -@@ -535,7 +534,6 @@ VclGtkClipboard::~VclGtkClipboard() +@@ -534,7 +536,6 @@ VclGtkClipboard::~VclGtkClipboard() { GtkClipboard* clipboard = gtk_clipboard_get(m_nSelection); g_signal_handler_disconnect(clipboard, m_nOwnerChangedSignalId); @@ -237,7 +232,7 @@ index 06a5427..25f4590 100644 ClipboardClear(nullptr); } -@@ -600,15 +598,16 @@ void VclGtkClipboard::setContents( +@@ -599,15 +600,16 @@ void VclGtkClipboard::setContents( std::vector aGtkTargets(m_aConversionHelper.FormatsToGtk(aFormats)); if (!aGtkTargets.empty()) { diff --git a/0001-Resolves-rhbz-1352965-gtk3-infinite-clipboard-recurs.patch b/0001-Resolves-rhbz-1352965-gtk3-infinite-clipboard-recurs.patch index c338044..1c222e2 100644 --- a/0001-Resolves-rhbz-1352965-gtk3-infinite-clipboard-recurs.patch +++ b/0001-Resolves-rhbz-1352965-gtk3-infinite-clipboard-recurs.patch @@ -1,4 +1,4 @@ -From 785f89233eb588447af2e5f712c2b555b4fbc344 Mon Sep 17 00:00:00 2001 +From 25477cb518a464fb052e55c2b7c250af606ba42d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 8 Jul 2016 14:50:56 +0100 Subject: [PATCH] Resolves: rhbz#1352965 gtk3 infinite clipboard recursion with @@ -10,10 +10,10 @@ Change-Id: Ib67afaf532b8409e05fffbf1b8312d664460567d 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx -index 25f4590..72599b2 100644 +index 8b01166..c92bf43 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx -@@ -585,6 +585,7 @@ void VclGtkClipboard::setContents( +@@ -587,6 +587,7 @@ void VclGtkClipboard::setContents( { osl::ClearableMutexGuard aGuard( m_aMutex ); Reference< datatransfer::clipboard::XClipboardOwner > xOldOwner( m_aOwner ); @@ -21,8 +21,8 @@ index 25f4590..72599b2 100644 Reference< datatransfer::XTransferable > xOldContents( m_aContents ); m_aContents = xTrans; m_aOwner = xClipboardOwner; -@@ -592,6 +593,10 @@ void VclGtkClipboard::setContents( - std::list< Reference< datatransfer::clipboard::XClipboardListener > > xListeners( m_aListeners ); +@@ -594,6 +595,10 @@ void VclGtkClipboard::setContents( + std::list< Reference< datatransfer::clipboard::XClipboardListener > > aListeners( m_aListeners ); datatransfer::clipboard::ClipboardEvent aEv; + GtkClipboard* clipboard = gtk_clipboard_get(m_nSelection); @@ -32,7 +32,7 @@ index 25f4590..72599b2 100644 if (m_aContents.is()) { css::uno::Sequence aFormats = xTrans->getTransferDataFlavors(); -@@ -605,15 +610,11 @@ void VclGtkClipboard::setContents( +@@ -607,15 +612,11 @@ void VclGtkClipboard::setContents( aEntry.info = 0; aGtkTargets.push_back(aEntry); @@ -48,7 +48,7 @@ index 25f4590..72599b2 100644 m_aGtkTargets = aGtkTargets; } -@@ -621,7 +622,7 @@ void VclGtkClipboard::setContents( +@@ -623,7 +624,7 @@ void VclGtkClipboard::setContents( aGuard.clear(); @@ -56,7 +56,7 @@ index 25f4590..72599b2 100644 + if (bOwnerChange) xOldOwner->lostOwnership( this, xOldContents ); for( std::list< Reference< datatransfer::clipboard::XClipboardListener > >::iterator it = - xListeners.begin(); it != xListeners.end() ; ++it ) + aListeners.begin(); it != aListeners.end() ; ++it ) -- 2.7.4 diff --git a/libreoffice.spec b/libreoffice.spec index 4054413..abce751 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -240,8 +240,7 @@ Patch10: 0001-don-t-autocapitalize-words-that-follow-a-field-mark.patch Patch11: 0001-a11y-crash-on-deleting-certain-frame-in-certain-docu.patch Patch12: 0001-Resolves-rhbz-1353069-don-t-clear-XATTR_FILL-from-st.patch Patch13: 0001-Resolves-rhbz-1351224-wayland-grab-related-crashes.patch -Patch14: 0001-Resolves-rhbz-1326304-cannot-detect-loss-of-wayland-.patch -Patch15: 0001-Resolves-rhbz-1352965-gtk3-infinite-clipboard-recurs.patch +Patch14: 0001-Resolves-rhbz-1352965-gtk3-infinite-clipboard-recurs.patch %if 0%{?rhel} # not upstreamed