mirror of
				https://github.com/DreamMaoMao/maomaowm.git
				synced 2025-11-03 09:01:47 -05:00 
			
		
		
		
	opt: Avoid setting incorrect surfaces
This commit is contained in:
		
							parent
							
								
									940ff0c1cc
								
							
						
					
					
						commit
						b539b4bf9a
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
					@ -1244,6 +1244,10 @@ void client_apply_clip(Client *c) {
 | 
				
			||||||
    client_get_clip(c, &clip_box);
 | 
					    client_get_clip(c, &clip_box);
 | 
				
			||||||
    offset = clip_to_hide(c, &clip_box);
 | 
					    offset = clip_to_hide(c, &clip_box);
 | 
				
			||||||
    apply_border(c, clip_box, offset.x, offset.y);
 | 
					    apply_border(c, clip_box, offset.x, offset.y);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if(clip_box.width <= 0 || clip_box.height <= 0)
 | 
				
			||||||
 | 
					      return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip_box);
 | 
					    wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip_box);
 | 
				
			||||||
    buffer_set_effect(c, (animationScale){0, 0, 0, 0, false});
 | 
					    buffer_set_effect(c, (animationScale){0, 0, 0, 0, false});
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
| 
						 | 
					@ -1267,9 +1271,12 @@ void client_apply_clip(Client *c) {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  offset = clip_to_hide(c, &clip_box);
 | 
					  offset = clip_to_hide(c, &clip_box);
 | 
				
			||||||
 | 
					  apply_border(c, clip_box, offset.x, offset.y);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if(clip_box.width <= 0 || clip_box.height <= 0)
 | 
				
			||||||
 | 
					    return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip_box);
 | 
					  wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip_box);
 | 
				
			||||||
  apply_border(c, clip_box, offset.x, offset.y);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  scale_data.should_scale = true;
 | 
					  scale_data.should_scale = true;
 | 
				
			||||||
  scale_data.width = clip_box.width - 2 * c->bw;
 | 
					  scale_data.width = clip_box.width - 2 * c->bw;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue