Skip to content
Snippets Groups Projects

phosh: Scale monitor resolution

Merged Guido Gunther requested to merge guido.gunther/phosh:fix-menus-with-scale into master
+ 5
4
@@ -601,19 +601,20 @@ void
phosh_shell_get_usable_area (PhoshShell *self, gint *x, gint *y, gint *width, gint *height)
{
PhoshMonitor *monitor = NULL;
gint panel_height = 0;
gint w, h;
gint scale;
monitor = phosh_shell_get_primary_monitor (self);
g_return_if_fail(monitor);
w = monitor->width / monitor->scale;
h = (monitor->height - panel_height) / monitor->scale;
scale = monitor->scale ? monitor->scale : 1;
w = monitor->width / scale;
h = monitor->height / scale - PHOSH_PANEL_HEIGHT - PHOSH_HOME_HEIGHT;
if (x)
*x = 0;
if (y)
*y = panel_height;
*y = PHOSH_PANEL_HEIGHT;
if (width)
*width = w;
if (height)
Loading