(svn r3217) Fix issue with resizing stepped windows introduced in revision 3181.
This commit is contained in:
		
							
								
								
									
										8
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								window.c
									
									
									
									
									
								
							@@ -1017,10 +1017,12 @@ static bool HandleWindowDragging(void)
 | 
				
			|||||||
			x = _cursor.pos.x - _drag_delta.x;
 | 
								x = _cursor.pos.x - _drag_delta.x;
 | 
				
			||||||
			y = _cursor.pos.y - _drag_delta.y;
 | 
								y = _cursor.pos.y - _drag_delta.y;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/* X and Y has to go by step.. calculate it */
 | 
								/* X and Y has to go by step.. calculate it.
 | 
				
			||||||
			if (w->resize.step_width > 1) x = x - (x % w->resize.step_width);
 | 
								 * The cast to int is necessary else x/y are implicitly casted to
 | 
				
			||||||
 | 
								 * unsigned int, which won't work. */
 | 
				
			||||||
 | 
								if (w->resize.step_width > 1) x -= x % (int)w->resize.step_width;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (w->resize.step_height > 1) y = y - (y % w->resize.step_height);
 | 
								if (w->resize.step_height > 1) y -= y % (int)w->resize.step_height;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/* Check if we don't go below the minimum set size */
 | 
								/* Check if we don't go below the minimum set size */
 | 
				
			||||||
			if ((int)w->width + x < (int)w->resize.width)
 | 
								if ((int)w->width + x < (int)w->resize.width)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user