mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	action: allow only Previous/NextWindow action while window switching
This commit prevents some actions like SendToDesktop from being executed while window switching, which may mess up our scene-graph.
This commit is contained in:
		
							parent
							
								
									270b45da88
								
							
						
					
					
						commit
						7cc0c47923
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
					@ -877,6 +877,14 @@ actions_run(struct view *activator, struct server *server,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wl_list_for_each(action, actions, link) {
 | 
						wl_list_for_each(action, actions, link) {
 | 
				
			||||||
 | 
							if (server->input_mode == LAB_INPUT_STATE_WINDOW_SWITCHER
 | 
				
			||||||
 | 
									&& action->type != ACTION_TYPE_NEXT_WINDOW
 | 
				
			||||||
 | 
									&& action->type != ACTION_TYPE_PREVIOUS_WINDOW) {
 | 
				
			||||||
 | 
								wlr_log(WLR_INFO, "Only NextWindow or PreviousWindow "
 | 
				
			||||||
 | 
									"actions are accepted while window switching.");
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		wlr_log(WLR_DEBUG, "Handling action %u: %s", action->type,
 | 
							wlr_log(WLR_DEBUG, "Handling action %u: %s", action->type,
 | 
				
			||||||
			action_names[action->type]);
 | 
								action_names[action->type]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue