mirror of
https://github.com/brl/mutter.git
synced 2025-02-09 01:54:10 +00:00
x11: adjust size to minimal size when realizing
If you execute the following sequence : stage = clutter_stage_new (); clutter_actor_set_size (stage, 1280, 800); clutter_actor_realize (stage); Then you end up creating an onscreen buffer of size 1280x800 but ClutterStageX11 storing the stage size at 640x480. This patch resync the 2 implementation by using the ClutterStage's size in both classes when realizing. Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com> https://bugzilla.gnome.org/show_bug.cgi?id=667540
This commit is contained in:
parent
b1ff53d980
commit
d31bd6fe92
@ -435,6 +435,11 @@ clutter_stage_x11_realize (ClutterStageWindow *stage_window)
|
|||||||
stage_cogl->onscreen = cogl_onscreen_new (backend->cogl_context,
|
stage_cogl->onscreen = cogl_onscreen_new (backend->cogl_context,
|
||||||
width, height);
|
width, height);
|
||||||
|
|
||||||
|
/* We just created a window of the size of the actor. No need to fix
|
||||||
|
the size of the stage, just update it. */
|
||||||
|
stage_x11->xwin_width = width;
|
||||||
|
stage_x11->xwin_height = height;
|
||||||
|
|
||||||
if (stage_x11->xwin != None)
|
if (stage_x11->xwin != None)
|
||||||
{
|
{
|
||||||
cogl_x11_onscreen_set_foreign_window_xid (stage_cogl->onscreen,
|
cogl_x11_onscreen_set_foreign_window_xid (stage_cogl->onscreen,
|
||||||
@ -500,7 +505,6 @@ clutter_stage_x11_realize (ClutterStageWindow *stage_window)
|
|||||||
stage_cogl->wrapper,
|
stage_cogl->wrapper,
|
||||||
event_flags);
|
event_flags);
|
||||||
|
|
||||||
/* no user resize.. */
|
|
||||||
clutter_stage_x11_fix_window_size (stage_x11,
|
clutter_stage_x11_fix_window_size (stage_x11,
|
||||||
stage_x11->xwin_width,
|
stage_x11->xwin_width,
|
||||||
stage_x11->xwin_height);
|
stage_x11->xwin_height);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user