[stage] Force an allocation before showing the stage
A lot of applications change the size of the stage from the default before the stage is initially shown. The size change won't take affect until the first allocation run. However we want the window to be at the correct size when we first map it so we should force an allocation run before showing the stage. There was an explicit call to XResizeWindow in clutter_stage_x11_show. This is not needed anymore because XResizeWindow will already have been called by the allocate method.
This commit is contained in:
parent
8f9f6aaf41
commit
7b811f8be4
@ -321,6 +321,10 @@ clutter_stage_show (ClutterActor *self)
|
||||
|
||||
CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->show (self);
|
||||
|
||||
/* Possibly do an allocation run so that the stage will have the
|
||||
right size before we map it */
|
||||
_clutter_stage_maybe_relayout (self);
|
||||
|
||||
g_assert (priv->impl != NULL);
|
||||
impl = CLUTTER_STAGE_WINDOW (priv->impl);
|
||||
CLUTTER_STAGE_WINDOW_GET_IFACE (impl)->show (impl, TRUE);
|
||||
|
@ -562,21 +562,6 @@ clutter_stage_x11_show (ClutterStageWindow *stage_window,
|
||||
CLUTTER_NOTE (BACKEND, "Mapping stage[%lu]",
|
||||
(unsigned long) stage_x11->xwin);
|
||||
|
||||
if (!stage_x11->is_foreign_xwin)
|
||||
{
|
||||
CLUTTER_NOTE (BACKEND, "Resizing stage[%lu] (%d, %d)",
|
||||
(unsigned long) stage_x11->xwin,
|
||||
stage_x11->xwin_width,
|
||||
stage_x11->xwin_height);
|
||||
|
||||
CLUTTER_SET_PRIVATE_FLAGS (stage_x11->wrapper,
|
||||
CLUTTER_STAGE_IN_RESIZE);
|
||||
|
||||
XResizeWindow (stage_x11->xdpy, stage_x11->xwin,
|
||||
stage_x11->xwin_width,
|
||||
stage_x11->xwin_height);
|
||||
}
|
||||
|
||||
if (stage_x11->fullscreen_on_map)
|
||||
clutter_stage_x11_set_fullscreen (stage_window, TRUE);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user