Fix the bounds checking for area_get.
Mouse at far left (x=0) would not be able to click an area that starts at 0.
This commit is contained in:
		
							
								
								
									
										2
									
								
								bar.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								bar.c
									
									
									
									
									
								
							| @@ -212,7 +212,7 @@ area_t * | ||||
| area_get (xcb_window_t win, const int x) | ||||
| { | ||||
|     for (int i = 0; i < astack.pos; i++) | ||||
|         if (astack.slot[i].window == win && x > astack.slot[i].begin && x < astack.slot[i].end) | ||||
|         if (astack.slot[i].window == win && x >= astack.slot[i].begin && x < astack.slot[i].end) | ||||
|             return &astack.slot[i]; | ||||
|     return NULL; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user