mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Add support for focus notifications when tmux pane changes, based on
work by Aaron Jensen.
This commit is contained in:
		
							
								
								
									
										9
									
								
								input.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								input.c
									
									
									
									
									
								
							@@ -1260,6 +1260,9 @@ input_csi_dispatch(struct input_ctx *ictx)
 | 
				
			|||||||
		case 1003:
 | 
							case 1003:
 | 
				
			||||||
			screen_write_mode_clear(&ictx->ctx, ALL_MOUSE_MODES);
 | 
								screen_write_mode_clear(&ictx->ctx, ALL_MOUSE_MODES);
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 | 
							case 1004:
 | 
				
			||||||
 | 
								screen_write_mode_clear(&ictx->ctx, MODE_FOCUSON);
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
		case 1005:
 | 
							case 1005:
 | 
				
			||||||
			screen_write_mode_clear(&ictx->ctx, MODE_MOUSE_UTF8);
 | 
								screen_write_mode_clear(&ictx->ctx, MODE_MOUSE_UTF8);
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
@@ -1326,6 +1329,12 @@ input_csi_dispatch(struct input_ctx *ictx)
 | 
				
			|||||||
			screen_write_mode_clear(&ictx->ctx, ALL_MOUSE_MODES);
 | 
								screen_write_mode_clear(&ictx->ctx, ALL_MOUSE_MODES);
 | 
				
			||||||
			screen_write_mode_set(&ictx->ctx, MODE_MOUSE_ANY);
 | 
								screen_write_mode_set(&ictx->ctx, MODE_MOUSE_ANY);
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 | 
							case 1004:
 | 
				
			||||||
 | 
								if (s->mode & MODE_FOCUSON)
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								screen_write_mode_set(&ictx->ctx, MODE_FOCUSON);
 | 
				
			||||||
 | 
								wp->flags &= ~PANE_FOCUSED; /* force update if needed */
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
		case 1005:
 | 
							case 1005:
 | 
				
			||||||
			screen_write_mode_set(&ictx->ctx, MODE_MOUSE_UTF8);
 | 
								screen_write_mode_set(&ictx->ctx, MODE_MOUSE_UTF8);
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user