xss-dimmer: recent versions of Gdk seems to handle HiDPI differently

Or maybe that's GTK changing the way it reports position?
This commit is contained in:
Vincent Bernat 2023-01-29 15:44:45 +01:00
parent b531e4405a
commit b0fd8f4a04

View file

@ -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)