Changeset 4789
- Timestamp:
- Dec 9, 2011, 12:21:41 AM (10 years ago)
- Location:
- neercs/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
neercs/trunk/src/client.c
r4785 r4789 254 254 send_delay(screen_list); 255 255 } 256 screen_list->comm.attached = 1; 256 257 } 257 258 else if (!strncmp("CURSOR ", buf, 7)) … … 270 271 } 271 272 272 if (ret) 273 { 274 debug("ret1\n"); 275 break; 276 } 277 ret = caca_get_event(screen_list->dp, 278 CACA_EVENT_KEY_PRESS 279 | CACA_EVENT_MOUSE_PRESS 280 | CACA_EVENT_MOUSE_RELEASE 281 | CACA_EVENT_MOUSE_MOTION 282 | CACA_EVENT_RESIZE 283 | CACA_EVENT_QUIT, &ev, 10000); 284 if (ret) 285 ret = send_event(ev, screen_list); 286 287 if (ret) 288 { 289 debug("ret2\n"); 290 break; 273 /* Wait to have finished attaching before handling events */ 274 if (screen_list->comm.attached) 275 { 276 ret = caca_get_event(screen_list->dp, 277 CACA_EVENT_KEY_PRESS 278 | CACA_EVENT_MOUSE_PRESS 279 | CACA_EVENT_MOUSE_RELEASE 280 | CACA_EVENT_MOUSE_MOTION 281 | CACA_EVENT_RESIZE 282 | CACA_EVENT_QUIT, &ev, 10000); 283 if (ret) 284 ret = send_event(ev, screen_list); 285 if (ret) 286 { 287 debug("Failed send event, quitting: %s\n", strerror(errno)); 288 break; 289 } 291 290 } 292 291 } -
neercs/trunk/src/neercs.h
r4412 r4789 175 175 { 176 176 /* Detaching */ 177 int attached; /* Are we attached to a terminal */177 int attached; /* Are we attached to a terminal or a server */ 178 178 int socket[2]; /* Sockets to write to the server / to the client */ 179 179 char *socket_path[2]; /* Sockets to write to the server / to the client */ -
neercs/trunk/src/screen_list.c
r4366 r4789 77 77 screen_list->lock.lock_offset = 0; 78 78 screen_list->lock.lock_on_detach = 0; 79 screen_list->comm.attached = 1;79 screen_list->comm.attached = 0; 80 80 screen_list->comm.socket[SOCK_SERVER] = 0; 81 81 screen_list->comm.socket[SOCK_CLIENT] = 0;
Note: See TracChangeset
for help on using the changeset viewer.