mirror of
				https://github.com/DreamMaoMao/maomaowm.git
				synced 2025-11-03 09:01:47 -05:00 
			
		
		
		
	opt:optimize border color change when tagmon
This commit is contained in:
		
							parent
							
								
									2ab0da9cfa
								
							
						
					
					
						commit
						b4dd299c22
					
				
					 1 changed files with 6 additions and 5 deletions
				
			
		
							
								
								
									
										11
									
								
								maomao.c
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								maomao.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -5439,13 +5439,12 @@ void tag(const Arg *arg) {
 | 
			
		|||
 | 
			
		||||
void tagmon(const Arg *arg) {
 | 
			
		||||
  Client *c = focustop(selmon);
 | 
			
		||||
  Client *fc;
 | 
			
		||||
  Monitor *m;
 | 
			
		||||
  if (c) {
 | 
			
		||||
    if(c == selmon->sel) {
 | 
			
		||||
      selmon->sel = NULL;
 | 
			
		||||
    }
 | 
			
		||||
    m = dirtomon(arg->i);
 | 
			
		||||
    fc = focustop(selmon);
 | 
			
		||||
    if(!fc)
 | 
			
		||||
      selmon->sel = c;
 | 
			
		||||
    setmon(c, m, 0);
 | 
			
		||||
    reset_foreign_tolevel(c);
 | 
			
		||||
    // 重新计算居中的坐标
 | 
			
		||||
| 
						 | 
				
			
			@ -5455,16 +5454,18 @@ void tagmon(const Arg *arg) {
 | 
			
		|||
        (int)(c->geom.height * c->mon->w.height / selmon->w.height);
 | 
			
		||||
      selmon = c->mon;
 | 
			
		||||
      c->geom = setclient_coordinate_center(c->geom);
 | 
			
		||||
      focusclient(c, 1);
 | 
			
		||||
      resize(c, c->geom, 1);
 | 
			
		||||
    } else {
 | 
			
		||||
      selmon = c->mon;
 | 
			
		||||
      focusclient(c, 1);
 | 
			
		||||
      arrange(selmon, false);
 | 
			
		||||
    }
 | 
			
		||||
    warp_cursor_to_selmon(c->mon);
 | 
			
		||||
    focusclient(c, 1);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void overview(Monitor *m, unsigned int gappo, unsigned int gappi) {
 | 
			
		||||
  grid(m, overviewgappo, overviewgappi);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue