aboutsummaryrefslogtreecommitdiff
path: root/sysutils/synergy
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2008-10-13 06:56:57 +0000
committerKevin Lo <kevlo@FreeBSD.org>2008-10-13 06:56:57 +0000
commit544b16a3e0976fd60c017609cda72df935cb757f (patch)
tree3d9938c1b1f5a6efd9a6563a2e3f410d488ac872 /sysutils/synergy
parent862182f2a924fdf5779b80afa0b40d70bb2cdd07 (diff)
downloadports-544b16a3e0976fd60c017609cda72df935cb757f.tar.gz
ports-544b16a3e0976fd60c017609cda72df935cb757f.zip
Notes
Diffstat (limited to 'sysutils/synergy')
-rw-r--r--sysutils/synergy/Makefile2
-rw-r--r--sysutils/synergy/files/patch-lib__platform__CXWindowsClipboard.cpp52
-rw-r--r--sysutils/synergy/files/patch-lib__platform__CXWindowsClipboard.h11
3 files changed, 64 insertions, 1 deletions
diff --git a/sysutils/synergy/Makefile b/sysutils/synergy/Makefile
index 1106e4613c3d..f80771617bbd 100644
--- a/sysutils/synergy/Makefile
+++ b/sysutils/synergy/Makefile
@@ -7,7 +7,7 @@
PORTNAME= synergy
PORTVERSION= 1.3.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}2
diff --git a/sysutils/synergy/files/patch-lib__platform__CXWindowsClipboard.cpp b/sysutils/synergy/files/patch-lib__platform__CXWindowsClipboard.cpp
new file mode 100644
index 000000000000..dd40e23c82d3
--- /dev/null
+++ b/sysutils/synergy/files/patch-lib__platform__CXWindowsClipboard.cpp
@@ -0,0 +1,52 @@
+--- lib/platform/CXWindowsClipboard.cpp.orig 2006-04-02 09:47:03.000000000 +0800
++++ lib/platform/CXWindowsClipboard.cpp 2008-10-06 15:52:39.000000000 +0800
+@@ -219,7 +219,7 @@
+ if (reply->m_replied && reply->m_property == property) {
+ // if reply is complete then remove it and start the
+ // next one.
+- pushReplies(index, replies, index2);
++ pushReplies(index->first, replies, index2);
+ return true;
+ }
+ }
+@@ -928,17 +928,23 @@
+ {
+ // send the first reply for each window if that reply hasn't
+ // been sent yet.
+- for (CReplyMap::iterator index = m_replies.begin();
+- index != m_replies.end(); ++index) {
+- assert(!index->second.empty());
+- if (!index->second.front()->m_replied) {
+- pushReplies(index, index->second, index->second.begin());
++ CReplyMap::iterator index = m_replies.begin();
++ while (index != m_replies.end()) {
++ // increment index before calling pushReplies(...) as
++ // pushReplies(...) normally erases the member of the map, that
++ // index points to, invalidating index as iterator.
++ Window requestor = index->first;
++ CReplyList& replies = index->second;
++ index++;
++ assert(!replies.empty());
++ if (!replies.front()->m_replied) {
++ pushReplies(requestor, replies, replies.begin());
+ }
+ }
+ }
+
+ void
+-CXWindowsClipboard::pushReplies(CReplyMap::iterator mapIndex,
++CXWindowsClipboard::pushReplies(Window requestor,
+ CReplyList& replies, CReplyList::iterator index)
+ {
+ CReply* reply = *index;
+@@ -957,9 +963,8 @@
+ // and stop watching the requestor for events.
+ if (replies.empty()) {
+ CXWindowsUtil::CErrorLock lock(m_display);
+- Window requestor = mapIndex->first;
+ XSelectInput(m_display, requestor, m_eventMasks[requestor]);
+- m_replies.erase(mapIndex);
++ m_replies.erase(requestor);
+ m_eventMasks.erase(requestor);
+ }
+ }
diff --git a/sysutils/synergy/files/patch-lib__platform__CXWindowsClipboard.h b/sysutils/synergy/files/patch-lib__platform__CXWindowsClipboard.h
new file mode 100644
index 000000000000..322aa923345b
--- /dev/null
+++ b/sysutils/synergy/files/patch-lib__platform__CXWindowsClipboard.h
@@ -0,0 +1,11 @@
+--- lib/platform/CXWindowsClipboard.h.orig 2008-10-06 14:51:40.000000000 +0800
++++ lib/platform/CXWindowsClipboard.h 2008-10-06 14:52:33.000000000 +0800
+@@ -265,7 +265,7 @@
+ bool insertMultipleReply(Window, ::Time, Atom);
+ void insertReply(CReply*);
+ void pushReplies();
+- void pushReplies(CReplyMap::iterator,
++ void pushReplies(Window requestor,
+ CReplyList&, CReplyList::iterator);
+ bool sendReply(CReply*);
+ void clearReplies();