Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 86bd53f85aa342c5dbe1c2d6b36f696d > files > 11

lxdm-0.4.1-1.fc16.src.rpm

From: dgod <dgod.osa@gmail.com>
Date: Sun, 25 Dec 2011 07:23:19 +0000 (+0800)
Subject: fix event check bug caused cpu 100%
X-Git-Url: http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde%2Flxdm;a=commitdiff_plain;h=d4e41ecb36a1ea29482b75674d804bb0f05540b2;hp=f0951bdf736026b041001e846d2cb93f7f2852e1

fix event check bug caused cpu 100%
---

diff --git a/src/lxcom.c b/src/lxcom.c
index 02763eb..18ee12e 100644
--- a/src/lxcom.c
+++ b/src/lxcom.c
@@ -89,7 +89,7 @@ static gboolean lxcom_prepare (GSource *source,gint *timeout)
 
 static gboolean lxcom_check(GSource *source)
 {
-	return TRUE;
+	return (((LXComSource*)source)->poll.revents&G_IO_IN)?TRUE:FALSE;
 }
 
 static gboolean lxcom_dispatch (GSource *source,GSourceFunc callback,gpointer user_data)