diff options
Diffstat (limited to 'plugins/a11y-keyboard/msd-a11y-preferences-dialog.c')
-rw-r--r-- | plugins/a11y-keyboard/msd-a11y-preferences-dialog.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/a11y-keyboard/msd-a11y-preferences-dialog.c b/plugins/a11y-keyboard/msd-a11y-preferences-dialog.c index 410757a..92b75c3 100644 --- a/plugins/a11y-keyboard/msd-a11y-preferences-dialog.c +++ b/plugins/a11y-keyboard/msd-a11y-preferences-dialog.c @@ -177,11 +177,15 @@ get_dpi_from_x_server (void) if (screen != NULL) { double width_dpi; double height_dpi; + gint sc_width; + gint sc_height; + + gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, + &sc_width, &sc_height); + + width_dpi = dpi_from_pixels_and_mm (sc_width, gdk_screen_get_width_mm (screen)); + height_dpi = dpi_from_pixels_and_mm (sc_height, gdk_screen_get_height_mm (screen)); - width_dpi = dpi_from_pixels_and_mm (gdk_screen_get_width (screen), - gdk_screen_get_width_mm (screen)); - height_dpi = dpi_from_pixels_and_mm (gdk_screen_get_height (screen), - gdk_screen_get_height_mm (screen)); if (width_dpi < DPI_LOW_REASONABLE_VALUE || width_dpi > DPI_HIGH_REASONABLE_VALUE || height_dpi < DPI_LOW_REASONABLE_VALUE |