From 49536d138d6f233c140baa5addcf2f46430d92fd Mon Sep 17 00:00:00 2001 From: Shahzaib Ibrahim Date: Tue, 30 Dec 2025 14:00:59 +0100 Subject: [PATCH] [GTK] Replacing usages of Display#getDPI from gtk This is a preparatory commit to remove all **possible** usages of getDPI from gtk. Since getDPI is set to be deprecated. --- .../Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java index d329fb6670f..0178d8c60ba 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java @@ -723,8 +723,8 @@ protected void init () { } } defaultFont = OS.pango_font_description_copy (defaultFont); - Point dpi = getDPI(), screenDPI = getScreenDPI(); - if (dpi.y != screenDPI.y) { + Point screenDPI = getScreenDPI(); + if (this.dpi.y != screenDPI.y) { int size = OS.pango_font_description_get_size(defaultFont); OS.pango_font_description_set_size(defaultFont, size * dpi.y / screenDPI.y); }