Compare commits
	
		
			4 Commits
		
	
	
		
			f7912a8ce7
			...
			94a77a10d8
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						94a77a10d8
	
				 | 
					
					
						|||
| 
						
						
							
						
						d39c35e59e
	
				 | 
					
					
						|||
| 
						
						
							
						
						d47bcfb203
	
				 | 
					
					
						|||
| 
						
						
							
						
						ff08195973
	
				 | 
					
					
						
							
								
								
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							@@ -1,5 +1,5 @@
 | 
				
			|||||||
Copyright (c) 2007-2014 Paul Evans <leonerd@leonerd.org.uk>
 | 
					Copyright (c) 2007-2014 Paul Evans <leonerd@leonerd.org.uk>
 | 
				
			||||||
Copyright (c) 2014-2020 Přemysl Eric Janouch <p@janouch.name>
 | 
					Copyright (c) 2014-2021 Přemysl Eric Janouch <p@janouch.name>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
					Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
				
			||||||
of this software and associated documentation files (the "Software"), to deal
 | 
					of this software and associated documentation files (the "Software"), to deal
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								driver-ti.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								driver-ti.c
									
									
									
									
									
								
							@@ -272,7 +272,8 @@ load_terminfo (termo_ti_t *ti, const char *term)
 | 
				
			|||||||
	if (!have_mouse)
 | 
						if (!have_mouse)
 | 
				
			||||||
		ti->tk->guessed_mouse_proto = TERMO_MOUSE_PROTO_NONE;
 | 
							ti->tk->guessed_mouse_proto = TERMO_MOUSE_PROTO_NONE;
 | 
				
			||||||
	else if (strstr (term, "rxvt") == term)
 | 
						else if (strstr (term, "rxvt") == term)
 | 
				
			||||||
		// urxvt generally doesn't understand the SGR protocol.
 | 
							// urxvt didn't understand the SGR protocol until version 9.25,
 | 
				
			||||||
 | 
							// it's safest to keep using 1015.
 | 
				
			||||||
		ti->tk->guessed_mouse_proto = TERMO_MOUSE_PROTO_RXVT;
 | 
							ti->tk->guessed_mouse_proto = TERMO_MOUSE_PROTO_RXVT;
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		// SGR (1006) is the superior protocol.  If it's not supported by the
 | 
							// SGR (1006) is the superior protocol.  If it's not supported by the
 | 
				
			||||||
@@ -363,6 +364,8 @@ mouse_reset (termo_ti_t *ti)
 | 
				
			|||||||
		&& write_string (ti->tk, "\x1b[?1002l")
 | 
							&& write_string (ti->tk, "\x1b[?1002l")
 | 
				
			||||||
		&& write_string (ti->tk, "\x1b[?1003l")
 | 
							&& write_string (ti->tk, "\x1b[?1003l")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							&& write_string (ti->tk, "\x1b[?1004l")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		&& write_string (ti->tk, "\x1b[?1005l")
 | 
							&& write_string (ti->tk, "\x1b[?1005l")
 | 
				
			||||||
		&& write_string (ti->tk, "\x1b[?1006l")
 | 
							&& write_string (ti->tk, "\x1b[?1006l")
 | 
				
			||||||
		&& write_string (ti->tk, "\x1b[?1015l");
 | 
							&& write_string (ti->tk, "\x1b[?1015l");
 | 
				
			||||||
@@ -410,8 +413,12 @@ start_driver (termo_t *tk, void *info)
 | 
				
			|||||||
	// Disable everything mouse-related first
 | 
						// Disable everything mouse-related first
 | 
				
			||||||
	if (!mouse_reset (ti))
 | 
						if (!mouse_reset (ti))
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Enable focus tracking opportunistically and automatically,
 | 
				
			||||||
 | 
						// as it basically doesn't have any negative consequences at all
 | 
				
			||||||
	return mouse_set_proto (ti, tk->mouse_proto, true)
 | 
						return mouse_set_proto (ti, tk->mouse_proto, true)
 | 
				
			||||||
		&& mouse_set_tracking_mode (ti, tk->mouse_tracking, true);
 | 
							&& mouse_set_tracking_mode (ti, tk->mouse_tracking, true)
 | 
				
			||||||
 | 
							&& write_string (ti->tk, "\x1b[?1004h");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int
 | 
					static int
 | 
				
			||||||
@@ -425,7 +432,8 @@ stop_driver (termo_t *tk, void *info)
 | 
				
			|||||||
	if (tk->mouse_proto == TERMO_MOUSE_PROTO_NONE)
 | 
						if (tk->mouse_proto == TERMO_MOUSE_PROTO_NONE)
 | 
				
			||||||
		return true;
 | 
							return true;
 | 
				
			||||||
	return mouse_set_proto (ti, tk->mouse_proto, false)
 | 
						return mouse_set_proto (ti, tk->mouse_proto, false)
 | 
				
			||||||
		&& mouse_set_tracking_mode (ti, tk->mouse_tracking, false);
 | 
							&& mouse_set_tracking_mode (ti, tk->mouse_tracking, false)
 | 
				
			||||||
 | 
							&& write_string (ti->tk, "\x1b[?1004l");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void *
 | 
					static void *
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								termo.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								termo.c
									
									
									
									
									
								
							@@ -1695,9 +1695,9 @@ termo_strpkey_generic (termo_t *tk, const char *str, termo_key_t *key,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		if (!str
 | 
							if (!str
 | 
				
			||||||
		 || key->type != TERMO_TYPE_KEY
 | 
							 || key->type != TERMO_TYPE_KEY
 | 
				
			||||||
 		 || key->code.codepoint < '@'
 | 
							 || key->code.codepoint < '@'
 | 
				
			||||||
		 || key->code.codepoint > '_'
 | 
							 || key->code.codepoint > '_'
 | 
				
			||||||
 		 || key->modifiers != 0)
 | 
							 || key->modifiers != 0)
 | 
				
			||||||
			return NULL;
 | 
								return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (key->code.codepoint >= 'A'
 | 
							if (key->code.codepoint >= 'A'
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user