mirror of
				https://github.com/DreamMaoMao/maomaowm.git
				synced 2025-11-03 09:01:47 -05:00 
			
		
		
		
	fix: apply named scratch size fail
This commit is contained in:
		
							parent
							
								
									afbf1cc22a
								
							
						
					
					
						commit
						ba24b3348c
					
				
					 1 changed files with 10 additions and 10 deletions
				
			
		
							
								
								
									
										20
									
								
								src/mango.c
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								src/mango.c
									
										
									
									
									
								
							| 
						 | 
					@ -910,11 +910,13 @@ void show_scratchpad(Client *c) {
 | 
				
			||||||
	/* return if fullscreen */
 | 
						/* return if fullscreen */
 | 
				
			||||||
	if (!c->isfloating) {
 | 
						if (!c->isfloating) {
 | 
				
			||||||
		setfloating(c, 1);
 | 
							setfloating(c, 1);
 | 
				
			||||||
		c->geom.width = c->scratchpad_width
 | 
							c->geom.width = c->scratchpad_width ? c->scratchpad_width
 | 
				
			||||||
							? c->scratchpad_width
 | 
											: c->oldgeom.width
 | 
				
			||||||
 | 
												? c->oldgeom.width
 | 
				
			||||||
							: c->mon->w.width * scratchpad_width_ratio;
 | 
												: c->mon->w.width * scratchpad_width_ratio;
 | 
				
			||||||
		c->geom.height = c->scratchpad_height
 | 
							c->geom.height = c->scratchpad_height ? c->scratchpad_height
 | 
				
			||||||
							 ? c->scratchpad_height
 | 
											 : c->oldgeom.height
 | 
				
			||||||
 | 
												 ? c->oldgeom.height
 | 
				
			||||||
							 : c->mon->w.height * scratchpad_height_ratio;
 | 
												 : c->mon->w.height * scratchpad_height_ratio;
 | 
				
			||||||
		// 重新计算居中的坐标
 | 
							// 重新计算居中的坐标
 | 
				
			||||||
		c->oldgeom = c->geom = c->animainit_geom = c->animation.current =
 | 
							c->oldgeom = c->geom = c->animainit_geom = c->animation.current =
 | 
				
			||||||
| 
						 | 
					@ -1173,6 +1175,10 @@ void applyrules(Client *c) {
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (c->isnamedscratchpad) {
 | 
				
			||||||
 | 
								c->isfloating = 1;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// set geometry of floating client
 | 
							// set geometry of floating client
 | 
				
			||||||
		if (c->isfloating) {
 | 
							if (c->isfloating) {
 | 
				
			||||||
			if (r->width > 0)
 | 
								if (r->width > 0)
 | 
				
			||||||
| 
						 | 
					@ -1222,12 +1228,6 @@ void applyrules(Client *c) {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// set mon and floating, fullscreen and scratchpad state
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (c->isnamedscratchpad) {
 | 
					 | 
				
			||||||
		c->isfloating = 1;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	int fullscreen_state_backup = c->isfullscreen || client_wants_fullscreen(c);
 | 
						int fullscreen_state_backup = c->isfullscreen || client_wants_fullscreen(c);
 | 
				
			||||||
	setmon(c, mon, newtags,
 | 
						setmon(c, mon, newtags,
 | 
				
			||||||
		   !c->isopensilent && (!c->istagsilent || !newtags ||
 | 
							   !c->isopensilent && (!c->istagsilent || !newtags ||
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue