mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	Make clients exit orderly when there is no connection
This commit is contained in:
		
							parent
							
								
									91b5999ce4
								
							
						
					
					
						commit
						e9f5e36730
					
				
					 7 changed files with 28 additions and 0 deletions
				
			
		| 
						 | 
					@ -581,6 +581,10 @@ main(int argc, char *argv[])
 | 
				
			||||||
	srandom(tv.tv_usec);
 | 
						srandom(tv.tv_usec);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	d = display_create(&argc, &argv, option_entries);
 | 
						d = display_create(&argc, &argv, option_entries);
 | 
				
			||||||
 | 
						if (d == NULL) {
 | 
				
			||||||
 | 
							fprintf(stderr, "failed to create display: %m\n");
 | 
				
			||||||
 | 
							return -1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	display_set_drag_offer_handler(d, drag_offer_handler);
 | 
						display_set_drag_offer_handler(d, drag_offer_handler);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -124,6 +124,10 @@ int main(int argc, char *argv[])
 | 
				
			||||||
	struct display *d;
 | 
						struct display *d;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	d = display_create(&argc, &argv, NULL);
 | 
						d = display_create(&argc, &argv, NULL);
 | 
				
			||||||
 | 
						if (d == NULL) {
 | 
				
			||||||
 | 
							fprintf(stderr, "failed to create display: %m\n");
 | 
				
			||||||
 | 
							return -1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flower.x = 512;
 | 
						flower.x = 512;
 | 
				
			||||||
	flower.y = 384;
 | 
						flower.y = 384;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -413,6 +413,10 @@ int main(int argc, char *argv[])
 | 
				
			||||||
	struct gears *gears;
 | 
						struct gears *gears;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	d = display_create(&argc, &argv, NULL);
 | 
						d = display_create(&argc, &argv, NULL);
 | 
				
			||||||
 | 
						if (d == NULL) {
 | 
				
			||||||
 | 
							fprintf(stderr, "failed to create display: %m\n");
 | 
				
			||||||
 | 
							return -1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	gears = gears_create(d);
 | 
						gears = gears_create(d);
 | 
				
			||||||
	display_run(d);
 | 
						display_run(d);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -244,6 +244,10 @@ main(int argc, char *argv[])
 | 
				
			||||||
	int i;
 | 
						int i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	d = display_create(&argc, &argv, option_entries);
 | 
						d = display_create(&argc, &argv, option_entries);
 | 
				
			||||||
 | 
						if (d == NULL) {
 | 
				
			||||||
 | 
							fprintf(stderr, "failed to create display: %m\n");
 | 
				
			||||||
 | 
							return -1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (i = 1; i < argc; i++) {
 | 
						for (i = 1; i < argc; i++) {
 | 
				
			||||||
		struct image *image;
 | 
							struct image *image;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -267,6 +267,10 @@ int main(int argc, char *argv[])
 | 
				
			||||||
	int size;
 | 
						int size;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	d = display_create(&argc, &argv, NULL);
 | 
						d = display_create(&argc, &argv, NULL);
 | 
				
			||||||
 | 
						if (d == NULL) {
 | 
				
			||||||
 | 
							fprintf(stderr, "failed to create display: %m\n");
 | 
				
			||||||
 | 
							return -1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	smoke.x = 200;
 | 
						smoke.x = 200;
 | 
				
			||||||
	smoke.y = 200;
 | 
						smoke.y = 200;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -548,6 +548,10 @@ int main(int argc, char *argv[])
 | 
				
			||||||
	struct terminal *terminal;
 | 
						struct terminal *terminal;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	d = display_create(&argc, &argv, option_entries);
 | 
						d = display_create(&argc, &argv, option_entries);
 | 
				
			||||||
 | 
						if (d == NULL) {
 | 
				
			||||||
 | 
							fprintf(stderr, "failed to create display: %m\n");
 | 
				
			||||||
 | 
							return -1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	terminal = terminal_create(d, option_fullscreen);
 | 
						terminal = terminal_create(d, option_fullscreen);
 | 
				
			||||||
	if (terminal_run(terminal, "/bin/bash"))
 | 
						if (terminal_run(terminal, "/bin/bash"))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -207,6 +207,10 @@ main(int argc, char *argv[])
 | 
				
			||||||
	int i;
 | 
						int i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	d = display_create(&argc, &argv, option_entries);
 | 
						d = display_create(&argc, &argv, option_entries);
 | 
				
			||||||
 | 
						if (d == NULL) {
 | 
				
			||||||
 | 
							fprintf(stderr, "failed to create display: %m\n");
 | 
				
			||||||
 | 
							return -1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (i = 1; i < argc; i++) {
 | 
						for (i = 1; i < argc; i++) {
 | 
				
			||||||
		struct view *view;
 | 
							struct view *view;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue