Fix ugly rounded corners
This commit is contained in:
		
							parent
							
								
									fb2ffd425e
								
							
						
					
					
						commit
						4c4dc9aa95
					
				
							
								
								
									
										13
									
								
								src/x11/x.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								src/x11/x.c
									
									
									
									
									
								
							| @ -110,10 +110,13 @@ static void x_win_round_corners(struct window_x11 *win, const int rad) | ||||
| 
 | ||||
|         /* To mark all pixels, which should get exposed, we
 | ||||
|          * use a circle for every corner and two overlapping rectangles */ | ||||
| 	int fw = settings.frame_width / 2 + settings.frame_width % 2; | ||||
| 	if (fw < 1) | ||||
| 		fw=1; | ||||
|         unsigned const int centercoords[] = { | ||||
|                 0,               0, | ||||
|                 width - dia - 1, 0, | ||||
|                 0,               height - dia - 1, | ||||
|                 -fw,             -fw, | ||||
|                 width - dia - 1, -fw, | ||||
|                 -fw,             height - dia - 1, | ||||
|                 width - dia - 1, height - dia - 1, | ||||
|         }; | ||||
| 
 | ||||
| @ -123,8 +126,8 @@ static void x_win_round_corners(struct window_x11 *win, const int rad) | ||||
|                          shape_gc, | ||||
|                          centercoords[i], | ||||
|                          centercoords[i+1], | ||||
|                          dia, | ||||
|                          dia, | ||||
|                          dia+fw, | ||||
|                          dia+fw, | ||||
|                          degrees * 0, | ||||
|                          degrees * 360); | ||||
|         } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Nikita Zlobin
						Nikita Zlobin