Mercurial > MadButterfly
comparison src/X_main.c @ 54:1b6dbafdf906
-
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 10 Aug 2008 00:29:11 +0800 |
parents | ffed18510d55 |
children | 01ed2bc37eed |
comparison
equal
deleted
inserted
replaced
53:ffed18510d55 | 54:1b6dbafdf906 |
---|---|
73 int xcon; | 73 int xcon; |
74 fd_set rds; | 74 fd_set rds; |
75 int nfds; | 75 int nfds; |
76 struct timeval tmo; | 76 struct timeval tmo; |
77 mb_timeval_t mb_tmo, next_mb_tmo; | 77 mb_timeval_t mb_tmo, next_mb_tmo; |
78 int r, r1; | 78 int r; |
79 | 79 |
80 XSelectInput(display, win, PointerMotionMask | ExposureMask); | 80 XSelectInput(display, win, PointerMotionMask | ExposureMask); |
81 XFlush(display); | 81 XFlush(display); |
82 | 82 |
83 xcon = XConnectionNumber(display); | 83 xcon = XConnectionNumber(display); |
106 if(r == -1) { | 106 if(r == -1) { |
107 perror("select"); | 107 perror("select"); |
108 return; | 108 return; |
109 } | 109 } |
110 | 110 |
111 MB_TIMEVAL_ADD(&mb_tmo, &next_mb_tmo); | |
112 | |
113 if(r == 0) { | 111 if(r == 0) { |
112 MB_TIMEVAL_ADD(&mb_tmo, &next_mb_tmo); | |
113 | |
114 mb_tman_handle_timeout(tman, &mb_tmo); | 114 mb_tman_handle_timeout(tman, &mb_tmo); |
115 rdman_redraw_changed(rdman); | 115 rdman_redraw_changed(rdman); |
116 XFlush(display); | 116 XFlush(display); |
117 } else if(FD_ISSET(xcon, &rds)) { | 117 } else if(FD_ISSET(xcon, &rds)) { |
118 event_interaction(display, rdman, w, h); | 118 event_interaction(display, rdman, w, h); |