Commit 3c9d5c63 authored by Guido Gunther's avatar Guido Gunther

phosh_shell_get_usable_area: don't fail when panel is not set up

Assume a panel height of 0 instead. This allows us to use it to setup
the panel itself.
parent 202b9726
......@@ -537,14 +537,13 @@ phosh_shell_get_usable_area (PhoshShell *self, gint *x, gint *y, gint *width, gi
first one for now */
GdkMonitor *monitor = gdk_display_get_monitor (display, 0);
GdkRectangle geom;
gint panel_height;
gint panel_height = 0;
gdk_monitor_get_geometry (monitor, &geom);
panel_height = phosh_panel_get_height (PHOSH_PANEL (priv->panel->window));
if (priv->panel && priv->panel->window)
panel_height = phosh_panel_get_height (PHOSH_PANEL (priv->panel->window));
/* GDK fails to take rotation into account
* */
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment