lxdm-0.4.1-event-check.patch 704 B

1234567891011121314151617181920212223242526
  1. From d4e41ecb36a1ea29482b75674d804bb0f05540b2 Mon Sep 17 00:00:00 2001
  2. From: dgod <dgod.osa@gmail.com>
  3. Date: Sun, 25 Dec 2011 15:23:19 +0800
  4. Subject: [PATCH 1/1] fix event check bug caused cpu 100%
  5. ---
  6. src/lxcom.c | 2 +-
  7. 1 files changed, 1 insertions(+), 1 deletions(-)
  8. diff --git a/src/lxcom.c b/src/lxcom.c
  9. index 02763eb..18ee12e 100644
  10. --- a/src/lxcom.c
  11. +++ b/src/lxcom.c
  12. @@ -89,7 +89,7 @@ static gboolean lxcom_prepare (GSource *source,gint *timeout)
  13. static gboolean lxcom_check(GSource *source)
  14. {
  15. - return TRUE;
  16. + return (((LXComSource*)source)->poll.revents&G_IO_IN)?TRUE:FALSE;
  17. }
  18. static gboolean lxcom_dispatch (GSource *source,GSourceFunc callback,gpointer user_data)
  19. --
  20. 1.7.4.1