mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	view.c: simplify view_at()
This commit is contained in:
		
							parent
							
								
									c56fe23b2e
								
							
						
					
					
						commit
						b99977368d
					
				
					 1 changed files with 2 additions and 19 deletions
				
			
		
							
								
								
									
										21
									
								
								src/view.c
									
										
									
									
									
								
							
							
						
						
									
										21
									
								
								src/view.c
									
										
									
									
									
								
							| 
						 | 
					@ -250,26 +250,9 @@ struct view *view_at(struct server *server, double lx, double ly,
 | 
				
			||||||
			return view;
 | 
								return view;
 | 
				
			||||||
		if (!view->show_server_side_deco)
 | 
							if (!view->show_server_side_deco)
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		if (deco_at(view, lx, ly) == LAB_DECO_PART_TITLE) {
 | 
							*view_area = deco_at(view, lx, ly);
 | 
				
			||||||
			*view_area = LAB_DECO_PART_TITLE;
 | 
							if (*view_area != LAB_DECO_NONE)
 | 
				
			||||||
			return view;
 | 
								return view;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
		if (deco_at(view, lx, ly) == LAB_DECO_PART_TOP) {
 | 
					 | 
				
			||||||
			*view_area = LAB_DECO_PART_TOP;
 | 
					 | 
				
			||||||
			return view;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		if (deco_at(view, lx, ly) == LAB_DECO_PART_RIGHT) {
 | 
					 | 
				
			||||||
			*view_area = LAB_DECO_PART_RIGHT;
 | 
					 | 
				
			||||||
			return view;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		if (deco_at(view, lx, ly) == LAB_DECO_PART_BOTTOM) {
 | 
					 | 
				
			||||||
			*view_area = LAB_DECO_PART_BOTTOM;
 | 
					 | 
				
			||||||
			return view;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		if (deco_at(view, lx, ly) == LAB_DECO_PART_LEFT) {
 | 
					 | 
				
			||||||
			*view_area = LAB_DECO_PART_LEFT;
 | 
					 | 
				
			||||||
			return view;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return NULL;
 | 
						return NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue