mirror of
				https://github.com/DreamMaoMao/maomaowm.git
				synced 2025-11-03 09:01:47 -05:00 
			
		
		
		
	fix: miss update float_geom when tile window tagmon
This commit is contained in:
		
							parent
							
								
									0ca4248002
								
							
						
					
					
						commit
						a855f6b45d
					
				
					 1 changed files with 9 additions and 7 deletions
				
			
		| 
						 | 
					@ -942,18 +942,20 @@ void tagmon(const Arg *arg) {
 | 
				
			||||||
	client_update_oldmonname_record(c, m);
 | 
						client_update_oldmonname_record(c, m);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	reset_foreign_tolevel(c);
 | 
						reset_foreign_tolevel(c);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						c->float_geom.width =
 | 
				
			||||||
 | 
							(int)(c->float_geom.width * c->mon->w.width / selmon->w.width);
 | 
				
			||||||
 | 
						c->float_geom.height =
 | 
				
			||||||
 | 
							(int)(c->float_geom.height * c->mon->w.height / selmon->w.height);
 | 
				
			||||||
 | 
						selmon = c->mon;
 | 
				
			||||||
 | 
						c->float_geom = setclient_coordinate_center(c, c->float_geom, 0, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// 重新计算居中的坐标
 | 
						// 重新计算居中的坐标
 | 
				
			||||||
	if (c->isfloating) {
 | 
						if (c->isfloating) {
 | 
				
			||||||
		c->geom.width =
 | 
							c->geom = c->float_geom;
 | 
				
			||||||
			(int)(c->geom.width * c->mon->w.width / selmon->w.width);
 | 
					 | 
				
			||||||
		c->geom.height =
 | 
					 | 
				
			||||||
			(int)(c->geom.height * c->mon->w.height / selmon->w.height);
 | 
					 | 
				
			||||||
		selmon = c->mon;
 | 
					 | 
				
			||||||
		c->geom = setclient_coordinate_center(c, c->geom, 0, 0);
 | 
					 | 
				
			||||||
		target = get_tags_first_tag(c->tags);
 | 
							target = get_tags_first_tag(c->tags);
 | 
				
			||||||
		view(&(Arg){.ui = target}, true);
 | 
							view(&(Arg){.ui = target}, true);
 | 
				
			||||||
		focusclient(c, 1);
 | 
							focusclient(c, 1);
 | 
				
			||||||
		c->float_geom = c->geom;
 | 
					 | 
				
			||||||
		resize(c, c->geom, 1);
 | 
							resize(c, c->geom, 1);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		selmon = c->mon;
 | 
							selmon = c->mon;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue