fixed x-error handling / warnings because it did return unspecific
This commit is contained in:
		
							parent
							
								
									ed62570d2e
								
							
						
					
					
						commit
						aae4511c7b
					
				|  | @ -29,24 +29,22 @@ | ||||||
| 	       (if (not (eq? queue (display:error-queue display))) | 	       (if (not (eq? queue (display:error-queue display))) | ||||||
| 		   (let* ((next (next-x-error-queue queue)) | 		   (let* ((next (next-x-error-queue queue)) | ||||||
| 			  (error (x-error-queue:this next))) | 			  (error (x-error-queue:this next))) | ||||||
| 		     (signal-x-warning error)) | 		     (signal-x-warning error))) | ||||||
| 		   result)))) | 	       result))) | ||||||
| 	  (thunk)) | 	  (thunk)) | ||||||
|       (error "first argument of an xlib-function must be a display object" |       (error "first argument of an xlib-function must be a display object" | ||||||
| 	     name display))) | 	     name display))) | ||||||
| 
 | 
 | ||||||
| (define (call-critical thunk) | (define (call-critical thunk) | ||||||
|   (let ((old-enabled (set-enabled-interrupts! no-interrupts)) |   (let ((old-enabled (set-enabled-interrupts! no-interrupts))) | ||||||
| 	(result (call-with-current-continuation |     (with-handler | ||||||
| 		 (lambda (return) |      (lambda (condition punt) | ||||||
| 		   (cons #t |  | ||||||
| 			 (with-handler (lambda (condition punt) |  | ||||||
| 					 (return (cons #f condition))) |  | ||||||
| 				       thunk)))))) |  | ||||||
|        (set-enabled-interrupts! old-enabled) |        (set-enabled-interrupts! old-enabled) | ||||||
|     (if (car result) |        (punt)) | ||||||
| 	(cdr result) |      (lambda () | ||||||
| 	(signal-condition (cdr result))))) |        (let ((result (thunk))) | ||||||
|  | 	 (set-enabled-interrupts! old-enabled) | ||||||
|  | 	 result))))) | ||||||
| 
 | 
 | ||||||
| ;; TODO: pixmap-formats (XListPixmapFormats) | ;; TODO: pixmap-formats (XListPixmapFormats) | ||||||
| (define-record-type display :display | (define-record-type display :display | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 frese
						frese