Commit 6db7529e authored by Guido Gunther's avatar Guido Gunther
Browse files

PhoshShell: Make background surface span the whole output

The background will make sure to not draw over/under panels.

Closes: #6
Signed-off-by: Guido Gunther's avatarGuido Günther <>
parent 8db37052
......@@ -45,8 +45,7 @@ image_background (GdkPixbuf *image, guint width, guint height)
bg = gdk_pixbuf_new_from_xpm_data (xpm_data);
scaled_bg = gdk_pixbuf_scale_simple (bg,
/* since we can't offset the pixmap */
g_object_unref (bg);
......@@ -107,7 +106,7 @@ load_background (PhoshBackground *self,
if (!image)
image = gdk_pixbuf_new_from_xpm_data (xpm_data);
g_object_get (self, "width", &width, "height", &height, NULL);
phosh_shell_get_usable_area (phosh_shell_get_default (), NULL, NULL, &width, &height);
self->pixbuf = image_background (image, width, height);
/* force background redraw */
......@@ -382,16 +382,14 @@ background_create (PhoshShell *self)
PhoshWayland *wl = phosh_wayland_get_default();
PhoshShellPrivate *priv = phosh_shell_get_instance_private (self);
PhoshMonitor *monitor;
gint width, height;
monitor = phosh_shell_get_primary_monitor (self);
g_return_if_fail (monitor);
phosh_shell_get_usable_area (self, NULL, NULL, &width, &height);
/* set it up as the background */
/* background spans the whole monitor */
priv->background = PHOSH_LAYER_SURFACE (phosh_background_new (
monitor->wl_output, width, height));
monitor->wl_output, monitor->width, monitor->height));
gtk_widget_show (GTK_WIDGET (priv->background));
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