Return value != 0 on Escape
This commit is contained in:
		
							
								
								
									
										3
									
								
								events.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								events.c
									
									
									
									
									
								
							@@ -47,6 +47,9 @@ void on_keypress(app_t *app, XEvent *ev) {
 | 
				
			|||||||
	keysym = XKeycodeToKeysym(dpy, (KeyCode) kev->keycode, 0);
 | 
						keysym = XKeycodeToKeysym(dpy, (KeyCode) kev->keycode, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	switch (keysym) {
 | 
						switch (keysym) {
 | 
				
			||||||
 | 
							case XK_Escape:
 | 
				
			||||||
 | 
								app_quit(app);
 | 
				
			||||||
 | 
								exit(1);
 | 
				
			||||||
		case XK_q:
 | 
							case XK_q:
 | 
				
			||||||
			app_quit(app);
 | 
								app_quit(app);
 | 
				
			||||||
			exit(0);
 | 
								exit(0);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user