Handle resize on root window.

This commit is contained in:
Tomas Frydrych 2008-08-20 13:01:40 +01:00
parent 655bfaec80
commit 2bcb7d73be

View File

@ -312,14 +312,14 @@ static gboolean meta_comp_window_has_shadow (MetaCompWindow *self);
static void static void
meta_comp_window_constructed (GObject *object) meta_comp_window_constructed (GObject *object)
{ {
MetaCompWindow *self = META_COMP_WINDOW (object); MetaCompWindow *self = META_COMP_WINDOW (object);
MetaCompWindowPrivate *priv = self->priv; MetaCompWindowPrivate *priv = self->priv;
MetaScreen *screen = priv->screen; MetaScreen *screen = priv->screen;
MetaDisplay *display = meta_screen_get_display (screen); MetaDisplay *display = meta_screen_get_display (screen);
Window xwindow = priv->xwindow; Window xwindow = priv->xwindow;
Display *xdisplay = meta_display_get_xdisplay (display); Display *xdisplay = meta_display_get_xdisplay (display);
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
XRenderPictFormat *format; XRenderPictFormat *format;
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
meta_comp_window_get_window_type (self); meta_comp_window_get_window_type (self);
@ -1136,7 +1136,30 @@ process_configure_notify (MetaCompositorClutter *compositor,
} }
else else
{ {
/* FIXME -- handle root window resizing */ GSList *l = meta_display_get_screens (display);
while (l)
{
MetaScreen *screen = l->data;
Window xroot = meta_screen_get_xroot (screen);
if (event->window == xroot)
{
gint width;
gint height;
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
meta_screen_get_size (screen, &width, &height);
clutter_actor_set_size (info->stage, width, height);
meta_verbose ("Changed size for stage on screen %d to %dx%d\n",
meta_screen_get_screen_number (screen),
width, height);
break;
}
l = l->next;
}
} }
} }