From b0fd8f4a0495aeb3c1159cda3a300b64aa78966a Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 29 Jan 2023 15:44:45 +0100 Subject: [PATCH] xss-dimmer: recent versions of Gdk seems to handle HiDPI differently Or maybe that's GTK changing the way it reports position? --- bin/xss-dimmer | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/xss-dimmer b/bin/xss-dimmer index 65bbaa9..cb4ccc6 100755 --- a/bin/xss-dimmer +++ b/bin/xss-dimmer @@ -57,7 +57,9 @@ def on_draw(widget, event, options, background, start): scale = widget.get_scale_factor() bg = None if background: - bg = background.new_subpixbuf(x, y, wwidth * scale, wheight * scale) + bg = background.new_subpixbuf( + x * scale, y * scale, wwidth * scale, wheight * scale + ) cctx.set_operator(cairo.OPERATOR_SOURCE) if not bg: cctx.set_source_rgba(0, 0, 0, opacity)