Fixed offsets in resize win to image
This commit is contained in:
		
							parent
							
								
									fbfec45b33
								
							
						
					
					
						commit
						09335fdc14
					
				
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @ -1,6 +1,6 @@ | |||||||
| all: sxiv | all: sxiv | ||||||
| 
 | 
 | ||||||
| VERSION=git-20110217 | VERSION=git-20110219 | ||||||
| 
 | 
 | ||||||
| CC?=gcc | CC?=gcc | ||||||
| PREFIX?=/usr/local | PREFIX?=/usr/local | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								main.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								main.c
									
									
									
									
									
								
							| @ -344,8 +344,8 @@ void on_keypress(XKeyEvent *kev) { | |||||||
| 			/* render on next configurenotify */ | 			/* render on next configurenotify */ | ||||||
| 			break; | 			break; | ||||||
| 		case XK_W: | 		case XK_W: | ||||||
| 			x = win.x + img.x; | 			x = MAX(0, win.x + img.x); | ||||||
| 			y = win.y + img.y; | 			y = MAX(0, win.y + img.y); | ||||||
| 			w = img.w * img.zoom; | 			w = img.w * img.zoom; | ||||||
| 			h = img.h * img.zoom; | 			h = img.h * img.zoom; | ||||||
| 			if ((changed = win_moveresize(&win, x, y, w, h))) { | 			if ((changed = win_moveresize(&win, x, y, w, h))) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Bert
						Bert