make sure we create a pixmap for all new mutter windows

In the case where a mutter window is created for an X Window that is
already mapped then we weren't calling mutter_window_mark_for_repair and
so we weren't calling XCompositeNameWindowPixmap e.g. for menu windows.

This doesn't get noticed because as soon as some damage gets delivered
for such windows the pixmap will be named anyway, but if we were to
change how damage is handled this would result in broken menus.

We now call mutter_window_mark_for_repair in mutter_window_new when the
given Window is already mapped.
This commit is contained in:
Robert Bragg 2010-03-19 19:09:06 +00:00
parent af60dd3634
commit cfa30f9876

View File

@ -1205,6 +1205,8 @@ mutter_window_new (MetaWindow *window)
priv = self->priv; priv = self->priv;
priv->mapped = meta_window_toplevel_is_mapped (priv->window); priv->mapped = meta_window_toplevel_is_mapped (priv->window);
if (priv->mapped)
mutter_window_mark_for_repair (self);
mutter_window_sync_actor_position (self); mutter_window_sync_actor_position (self);