mirror of
				https://github.com/DreamMaoMao/maomaowm.git
				synced 2025-11-03 09:01:47 -05:00 
			
		
		
		
	opt: optimize window bounds set and grabc optimize
grabc not trigger hotarea grabc not set bound
This commit is contained in:
		
							parent
							
								
									719c50de65
								
							
						
					
					
						commit
						4b0d3bde28
					
				
					 1 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1227,9 +1227,9 @@ void applybounds(Client *c, struct wlr_box *bbox) {
 | 
			
		|||
    c->geom.x = bbox->x + bbox->width - c->geom.width;
 | 
			
		||||
  if (c->geom.y >= bbox->y + bbox->height)
 | 
			
		||||
    c->geom.y = bbox->y + bbox->height - c->geom.height;
 | 
			
		||||
  if (c->geom.x + c->geom.width <= bbox->x)
 | 
			
		||||
  if (c->geom.x <= bbox->x)
 | 
			
		||||
    c->geom.x = bbox->x;
 | 
			
		||||
  if (c->geom.y + c->geom.height <= bbox->y)
 | 
			
		||||
  if (c->geom.y <= bbox->y)
 | 
			
		||||
    c->geom.y = bbox->y;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1472,6 +1472,9 @@ void toggle_hotarea(int x_root, int y_root) {
 | 
			
		|||
  if (!selmon)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  if(grabc)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  unsigned hx = selmon->m.x + hotarea_size;
 | 
			
		||||
  unsigned hy = selmon->m.y + selmon->m.height - hotarea_size;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -4797,7 +4800,7 @@ void resize(Client *c, struct wlr_box geo, int interact) {
 | 
			
		|||
 | 
			
		||||
  if (strcmp(c->mon->pertag->ltidxs[c->mon->pertag->curtag]->name,
 | 
			
		||||
             "scroller") == 0 &&
 | 
			
		||||
      !c->isfloating) {
 | 
			
		||||
      (!c->isfloating || c == grabc)) {
 | 
			
		||||
    c->geom = geo;
 | 
			
		||||
    c->geom.width = MAX(1 + 2 * (int)c->bw, c->geom.width);
 | 
			
		||||
    c->geom.height = MAX(1 + 2 * (int)c->bw, c->geom.height);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue