mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	window-rules: add root-toplevel critiera
This commit is contained in:
		
							parent
							
								
									c71fccbcec
								
							
						
					
					
						commit
						79bca44cb1
					
				
					 4 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
					@ -265,6 +265,7 @@ enum lab_view_criteria {
 | 
				
			||||||
	/* Positive criteria */
 | 
						/* Positive criteria */
 | 
				
			||||||
	LAB_VIEW_CRITERIA_FULLSCREEN              = 1 << 1,
 | 
						LAB_VIEW_CRITERIA_FULLSCREEN              = 1 << 1,
 | 
				
			||||||
	LAB_VIEW_CRITERIA_ALWAYS_ON_TOP           = 1 << 2,
 | 
						LAB_VIEW_CRITERIA_ALWAYS_ON_TOP           = 1 << 2,
 | 
				
			||||||
 | 
						LAB_VIEW_CRITERIA_ROOT_TOPLEVEL           = 1 << 3,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Negative criteria */
 | 
						/* Negative criteria */
 | 
				
			||||||
	LAB_VIEW_CRITERIA_NO_ALWAYS_ON_TOP        = 1 << 6,
 | 
						LAB_VIEW_CRITERIA_NO_ALWAYS_ON_TOP        = 1 << 6,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -127,6 +127,7 @@ desktop_cycle_view(struct server *server, struct view *start_view,
 | 
				
			||||||
	 * here and in the osd.c window-switcher code
 | 
						 * here and in the osd.c window-switcher code
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	enum lab_view_criteria criteria = LAB_VIEW_CRITERIA_CURRENT_WORKSPACE
 | 
						enum lab_view_criteria criteria = LAB_VIEW_CRITERIA_CURRENT_WORKSPACE
 | 
				
			||||||
 | 
							| LAB_VIEW_CRITERIA_ROOT_TOPLEVEL
 | 
				
			||||||
		| LAB_VIEW_CRITERIA_NO_SKIP_WINDOW_SWITCHER;
 | 
							| LAB_VIEW_CRITERIA_NO_SKIP_WINDOW_SWITCHER;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -410,6 +410,7 @@ display_osd(struct output *output)
 | 
				
			||||||
	wl_array_init(&views);
 | 
						wl_array_init(&views);
 | 
				
			||||||
	view_array_append(server, &views,
 | 
						view_array_append(server, &views,
 | 
				
			||||||
		LAB_VIEW_CRITERIA_CURRENT_WORKSPACE
 | 
							LAB_VIEW_CRITERIA_CURRENT_WORKSPACE
 | 
				
			||||||
 | 
							| LAB_VIEW_CRITERIA_ROOT_TOPLEVEL
 | 
				
			||||||
		| LAB_VIEW_CRITERIA_NO_SKIP_WINDOW_SWITCHER);
 | 
							| LAB_VIEW_CRITERIA_NO_SKIP_WINDOW_SWITCHER);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	float scale = output->wlr_output->scale;
 | 
						float scale = output->wlr_output->scale;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -108,6 +108,11 @@ matches_criteria(struct view *view, enum lab_view_criteria criteria)
 | 
				
			||||||
			return false;
 | 
								return false;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if (criteria & LAB_VIEW_CRITERIA_ROOT_TOPLEVEL) {
 | 
				
			||||||
 | 
							if (view != view_get_root(view)) {
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if (criteria & LAB_VIEW_CRITERIA_NO_ALWAYS_ON_TOP) {
 | 
						if (criteria & LAB_VIEW_CRITERIA_NO_ALWAYS_ON_TOP) {
 | 
				
			||||||
		if (view_is_always_on_top(view)) {
 | 
							if (view_is_always_on_top(view)) {
 | 
				
			||||||
			return false;
 | 
								return false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue