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;
g_return_if_fail(monitor);
g_return_if_fail(priv->panel);
g_return_if_fail(priv->panel->window);
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
* https://bugzilla.gnome.org/show_bug.cgi?id=793618 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment