Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
8a382d4a
Kaydet (Commit)
8a382d4a
authored
Eyl 01, 2016
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Related: rhbz#1362451 avoid recursive ownerchanged handling during ownerchange
Change-Id: Id9c12b7ce6458348890d7c7ff7fdb2cd37c4601c
üst
3e826f88
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
23 deletions
+32
-23
gtk3gtkinst.cxx
vcl/unx/gtk3/gtk3gtkinst.cxx
+32
-23
No files found.
vcl/unx/gtk3/gtk3gtkinst.cxx
Dosyayı görüntüle @
8a382d4a
...
...
@@ -364,6 +364,29 @@ namespace
}
}
namespace
{
void
ClipboardGetFunc
(
GtkClipboard
*
clipboard
,
GtkSelectionData
*
selection_data
,
guint
info
,
gpointer
user_data_or_owner
)
{
VclGtkClipboard
*
pThis
=
static_cast
<
VclGtkClipboard
*>
(
user_data_or_owner
);
pThis
->
ClipboardGet
(
clipboard
,
selection_data
,
info
);
}
void
ClipboardClearFunc
(
GtkClipboard
*
clipboard
,
gpointer
user_data_or_owner
)
{
VclGtkClipboard
*
pThis
=
static_cast
<
VclGtkClipboard
*>
(
user_data_or_owner
);
pThis
->
ClipboardClear
(
clipboard
);
}
void
handle_owner_change
(
GtkClipboard
*
clipboard
,
GdkEvent
*
event
,
gpointer
user_data
)
{
VclGtkClipboard
*
pThis
=
static_cast
<
VclGtkClipboard
*>
(
user_data
);
pThis
->
OwnerPossiblyChanged
(
clipboard
,
event
);
}
}
void
VclGtkClipboard
::
OwnerPossiblyChanged
(
GtkClipboard
*
clipboard
,
GdkEvent
*
/*event*/
)
{
if
(
!
m_aContents
.
is
())
...
...
@@ -376,6 +399,10 @@ void VclGtkClipboard::OwnerPossiblyChanged(GtkClipboard* clipboard, GdkEvent* /*
//our pid, in which case it's us.
bool
bSelf
=
false
;
//disconnect and reconnect after gtk_clipboard_wait_for_targets to
//avoid possible recursion
g_signal_handler_disconnect
(
clipboard
,
m_nOwnerChangedSignalId
);
OString
sTunnel
=
"application/x-libreoffice-internal-id-"
+
getPID
();
GdkAtom
*
targets
;
gint
n_targets
;
...
...
@@ -394,6 +421,9 @@ void VclGtkClipboard::OwnerPossiblyChanged(GtkClipboard* clipboard, GdkEvent* /*
g_free
(
targets
);
}
m_nOwnerChangedSignalId
=
g_signal_connect
(
clipboard
,
"owner-change"
,
G_CALLBACK
(
handle_owner_change
),
this
);
if
(
!
bSelf
)
{
//null out m_aContents to return control to the system-one which
...
...
@@ -486,29 +516,6 @@ void VclToGtkHelper::setSelectionData(const Reference<css::datatransfer::XTransf
aData
.
getLength
());
}
namespace
{
void
ClipboardGetFunc
(
GtkClipboard
*
clipboard
,
GtkSelectionData
*
selection_data
,
guint
info
,
gpointer
user_data_or_owner
)
{
VclGtkClipboard
*
pThis
=
static_cast
<
VclGtkClipboard
*>
(
user_data_or_owner
);
pThis
->
ClipboardGet
(
clipboard
,
selection_data
,
info
);
}
void
ClipboardClearFunc
(
GtkClipboard
*
clipboard
,
gpointer
user_data_or_owner
)
{
VclGtkClipboard
*
pThis
=
static_cast
<
VclGtkClipboard
*>
(
user_data_or_owner
);
pThis
->
ClipboardClear
(
clipboard
);
}
void
handle_owner_change
(
GtkClipboard
*
clipboard
,
GdkEvent
*
event
,
gpointer
user_data
)
{
VclGtkClipboard
*
pThis
=
static_cast
<
VclGtkClipboard
*>
(
user_data
);
pThis
->
OwnerPossiblyChanged
(
clipboard
,
event
);
}
}
VclGtkClipboard
::
VclGtkClipboard
(
GdkAtom
nSelection
)
:
cppu
::
WeakComponentImplHelper
<
datatransfer
::
clipboard
::
XSystemClipboard
,
datatransfer
::
clipboard
::
XFlushableClipboard
,
XServiceInfo
>
...
...
@@ -539,6 +546,7 @@ VclGtkClipboard::~VclGtkClipboard()
if
(
!
m_aGtkTargets
.
empty
())
{
gtk_clipboard_clear
(
clipboard
);
ClipboardClear
(
clipboard
);
}
assert
(
m_aGtkTargets
.
empty
());
}
...
...
@@ -602,6 +610,7 @@ void VclGtkClipboard::setContents(
if
(
!
m_aGtkTargets
.
empty
())
{
gtk_clipboard_clear
(
clipboard
);
ClipboardClear
(
clipboard
);
}
assert
(
m_aGtkTargets
.
empty
());
if
(
m_aContents
.
is
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment