]> birchwood-abbey.net Git - mit-scheme.git/commitdiff
gtk: Punt scaling a surface-ink's "exposed" surface. pucked
authorMatt Birkholz <matt@birchwood-abbey.net>
Fri, 28 Oct 2022 21:19:05 +0000 (14:19 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Fri, 28 Oct 2022 21:19:05 +0000 (14:19 -0700)
Perhaps gdk_window_create_similar_surface now takes
gdk_window_get_scale_factor into account?  /With/ the (second?)
scaling, the surface ink is four times as big as it should be, and
mostly black, except for the appropriately sized image of the blue
ball (with gray background) in its upper-left corner.

There still seems to be a shadow of a (1 pixel?) border around the
surface ink.

src/gtk/fix-layout.scm

index ac08a29c06e4a82f1a72874ae720ae20cbc8fda8..1b79ee37c802b45c575fc26d7af258074523b198 100644 (file)
@@ -1781,10 +1781,9 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 (define (get-exposed ink window)
   (assert-glib-locked 'get-exposed)
   (or (surface-ink-exposed ink)
-      (let ((extent (fix-ink-extent ink))
-           (scale (C-call "gdk_window_get_scale_factor" window)))
-       (let ((width (fix:* scale (fix-rect-width extent)))
-             (height (fix:* scale (fix-rect-height extent))))
+      (let ((extent (fix-ink-extent ink)))
+       (let ((width (fix-rect-width extent))
+             (height (fix-rect-height extent)))
          (let* ((surface (gdk-window-create-similar-surface window
                                                             width height))
                 (cr (cairo-create surface)))