Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not down-scale monitor geometries for GDK monitors
  • Loading branch information
vkareh authored and raveit65 committed Mar 13, 2018
1 parent 3d15308 commit 06c84c7
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions mate-panel/panel-multiscreen.c
Expand Up @@ -219,21 +219,8 @@ panel_multiscreen_get_gdk_monitors_for_screen (GdkScreen *screen,
num_monitors = gdk_display_get_n_monitors (display);
geometries = g_new (GdkRectangle, num_monitors);

for (i = 0; i < num_monitors; i++) {
GdkMonitor *monitor;
int scale;

monitor = gdk_display_get_monitor (display, i);
scale = gdk_monitor_get_scale_factor (monitor);

gdk_monitor_get_geometry (monitor, &(geometries[i]));

/* Scale geometries down to device pixels to support HiDPI displays */
geometries[i].x /= scale;
geometries[i].y /= scale;
geometries[i].width /= scale;
geometries[i].height /= scale;
}
for (i = 0; i < num_monitors; i++)
gdk_monitor_get_geometry (gdk_display_get_monitor (display, i), &(geometries[i]));

*monitors_ret = num_monitors;
*geometries_ret = geometries;
Expand Down

0 comments on commit 06c84c7

Please sign in to comment.