comparison finch/libgnt/gntmain.c @ 16281:82b6fdd899a9

Dialogs opened resulting from a mouse-click should fain focus.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 20 Apr 2007 08:02:57 +0000
parents 0e3a8505ebbe
children d0f9b2b217cf 56d2ae9cbb5c
comparison
equal deleted inserted replaced
16280:414044108a06 16281:82b6fdd899a9
209 endwin(); 209 endwin();
210 printf("EOF\n"); 210 printf("EOF\n");
211 raise(SIGABRT); 211 raise(SIGABRT);
212 } 212 }
213 213
214 gnt_wm_set_event_stack(wm, TRUE);
214 rd += HOLDING_ESCAPE; 215 rd += HOLDING_ESCAPE;
215 keys[rd] = 0; 216 keys[rd] = 0;
216 if (mouse_enabled && detect_mouse_action(keys)) 217 if (mouse_enabled && detect_mouse_action(keys))
217 return TRUE; 218 goto end;
218 219
219 if (HOLDING_ESCAPE) 220 if (HOLDING_ESCAPE)
220 keys[0] = '\033'; 221 keys[0] = '\033';
221 k = keys; 222 k = keys;
222 while (rd) { 223 while (rd) {
241 gnt_wm_process_input(wm, k); /* XXX: */ 242 gnt_wm_process_input(wm, k); /* XXX: */
242 k[p] = back; 243 k[p] = back;
243 rd -= p; 244 rd -= p;
244 k += p; 245 k += p;
245 } 246 }
246 247 end:
248 gnt_wm_set_event_stack(wm, FALSE);
247 return TRUE; 249 return TRUE;
248 } 250 }
249 251
250 static void 252 static void
251 setup_io() 253 setup_io()