(define-method fix-widget-new-geometry-callback ((widget <glx-viewport>))
(call-next-method widget)
- (if (glx-widget-xwindow widget)
- (let ((geometry (fix-widget-geometry widget)))
- (let ((w (fix-rect-width geometry))
- (h (fix-rect-height geometry)))
+ (let ((xwindow (glx-widget-xwindow widget)))
+ (if xwindow
+ (let ((geometry (fix-widget-geometry widget))
+ (scale (C-call "gdk_window_get_scale_factor" xwindow)))
+ (let ((w (fix:* scale (fix-rect-width geometry)))
+ (h (fix:* scale (fix-rect-height geometry))))
(let ((aspect (->flonum (/ w h))))
(with-glx-widget widget
(lambda ()
(glu:perspective (glx-viewport-fovy widget)
aspect
(glx-viewport-near widget)
- (glx-viewport-far widget)))))))))
+ (glx-viewport-far widget))))))))))
(define (draw-callback widget cr)
(declare (ignore cr))