rpms/synergy/devel synergy-1.3.1-stuttered-delay-fix.patch, NONE, 1.1 synergy.spec, 1.24, 1.25
Matthias Saou
thias at fedoraproject.org
Tue Nov 4 10:20:02 UTC 2008
- Previous message (by thread): rpms/synergy/F-8 synergy-1.3.1-stuttered-delay-fix.patch, NONE, 1.1 synergy.spec, 1.21, 1.22
- Next message (by thread): rpms/sugar-datastore/devel .cvsignore, 1.6, 1.7 sources, 1.6, 1.7 sugar-datastore.spec, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: thias
Update of /cvs/extras/rpms/synergy/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12790/devel
Modified Files:
synergy.spec
Added Files:
synergy-1.3.1-stuttered-delay-fix.patch
Log Message:
Include patch to fix delay issues (#469422).
synergy-1.3.1-stuttered-delay-fix.patch:
--- NEW FILE synergy-1.3.1-stuttered-delay-fix.patch ---
--- synergy-1.3.1/lib/platform/CXWindowsEventQueueBuffer.cpp 2005-04-24 12:32:16.000000000 +0930
+++ synergy-1.3.1/lib/platform/CXWindowsEventQueueBuffer.cpp 2008-10-02 11:14:18.112098206 +0930
@@ -84,6 +73,8 @@
pfds[0].events = POLLIN;
int timeout = (dtimeout < 0.0) ? -1 :
static_cast<int>(1000.0 * dtimeout);
+ int remaining = timeout;
+ int retval = 0;
#else
struct timeval timeout;
struct timeval* timeoutPtr;
@@ -102,19 +93,31 @@
FD_ZERO(&rfds);
FD_SET(ConnectionNumber(m_display), &rfds);
#endif
+ // It's possible that the X server has queued events locally
+ // in xlib's event buffer and not pushed on to the fd. Hence we
+ // can't simply monitor the fd as we may never be woken up.
+ // ie addEvent calls flush, XFlush may not send via the fd hence
+ // there is an event waiting to be sent but we must exit the poll
+ // before it can.
+ // Instead we poll for a brief period of time (so if events
+ // queued locally in the xlib buffer can be processed)
+ // and continue doing this until timeout is reached.
+ // The human eye can notice 60hz (ansi) which is 16ms, however
+ // we want to give the cpu a chance s owe up this to 25ms
+#define TIMEOUT_DELAY 25
- // wait for message from X server or for timeout. also check
- // if the thread has been cancelled. poll() should return -1
- // with EINTR when the thread is cancelled.
+ while( remaining > 0 && QLength(m_display)==0 && retval==0){
#if HAVE_POLL
- poll(pfds, 1, timeout);
+ retval = poll(pfds, 1, TIMEOUT_DELAY); //16ms = 60hz, but we make it > to play nicely with the cpu
#else
- select(ConnectionNumber(m_display) + 1,
+ retval = select(ConnectionNumber(m_display) + 1,
SELECT_TYPE_ARG234 &rfds,
SELECT_TYPE_ARG234 NULL,
SELECT_TYPE_ARG234 NULL,
- SELECT_TYPE_ARG5 timeoutPtr);
+ SELECT_TYPE_ARG5 TIMEOUT_DELAY);
#endif
+ remaining-=TIMEOUT_DELAY;
+ }
{
// we're no longer waiting for events
@@ -179,7 +184,7 @@
CXWindowsEventQueueBuffer::isEmpty() const
{
CLock lock(&m_mutex);
- return (XPending(m_display) == 0);
+ return (QLength(m_display) == 0 );
}
CEventQueueTimer*
Index: synergy.spec
===================================================================
RCS file: /cvs/extras/rpms/synergy/devel/synergy.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- synergy.spec 2 Jun 2008 18:40:56 -0000 1.24
+++ synergy.spec 4 Nov 2008 10:19:31 -0000 1.25
@@ -1,7 +1,7 @@
Summary: Mouse and keyboard sharing utility
Name: synergy
Version: 1.3.1
-Release: 9%{?dist}
+Release: 10%{?dist}
License: GPLv2
Group: System Environment/Daemons
URL: http://synergy2.sourceforge.net/
@@ -13,6 +13,8 @@
Patch3: synergy-1.3.1-X11-selection.patch
Patch4: synergy-1.3.1-X11-DPMS.patch
Patch5: synergy-1.3.1-warnings.patch
+# http://sf.net/tracker/?func=detail&atid=490469&aid=2141567&group_id=59275
+Patch6: synergy-1.3.1-stuttered-delay-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: libX11-devel, libXext-devel, libXtst-devel, libXt-devel
BuildRequires: libXinerama-devel
@@ -32,6 +34,7 @@
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
%build
@@ -62,6 +65,9 @@
%changelog
+* Tue Nov 4 2008 Matthias Saou <http://freshrpms.net/> 1.3.1-10
+- Include patch to fix delay issues (#469422).
+
* Mon Jun 2 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 1.3.1-9
- Drop no longer needed patch0, stop regenerating autoxxx files
- Apply the following bug fixes from upstream's bug tracker:
- Previous message (by thread): rpms/synergy/F-8 synergy-1.3.1-stuttered-delay-fix.patch, NONE, 1.1 synergy.spec, 1.21, 1.22
- Next message (by thread): rpms/sugar-datastore/devel .cvsignore, 1.6, 1.7 sources, 1.6, 1.7 sugar-datastore.spec, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list