After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 667540 - Desynchronized size between ClutterStageCogl and ClutterStageX11
Desynchronized size between ClutterStageCogl and ClutterStageX11
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterStage
1.8.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-01-09 12:42 UTC by Lionel Landwerlin
Modified: 2012-02-15 11:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch v1 (1.81 KB, patch)
2012-01-09 12:42 UTC, Lionel Landwerlin
committed Details | Review
patch on master (1.63 KB, patch)
2012-01-24 12:50 UTC, Lionel Landwerlin
reviewed Details | Review
patch v3 (1.38 KB, patch)
2012-01-24 14:13 UTC, Lionel Landwerlin
committed Details | Review

Description Lionel Landwerlin 2012-01-09 12:42:16 UTC
Created attachment 204859 [details] [review]
Patch v1

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 when ClutterStageCogl creating an onscreen buffer of
size 1280x800 but ClutterStageX11 storing the stage size at 640x480.
Comment 1 Emmanuele Bassi (:ebassi) 2012-01-24 12:33:47 UTC
can I get a patch against master?
Comment 2 Lionel Landwerlin 2012-01-24 12:50:04 UTC
Created attachment 205968 [details] [review]
patch on master

Here you go
Comment 3 Emmanuele Bassi (:ebassi) 2012-01-24 13:58:41 UTC
Review of attachment 205968 [details] [review]:

::: clutter/x11/clutter-stage-x11.c
@@ +502,3 @@
 
+  /* We just created a window of the size of the actor. No need to fix
+     the size of the stage, just update it. */

this cannot be right.

fix_window_size() is used to set the WMSizeHint, and that has nothing to do with the size of the actor.
Comment 4 Lionel Landwerlin 2012-01-24 14:13:23 UTC
Created attachment 205986 [details] [review]
patch v3

Indeed, I can't test on master, and the function has changed on this bits.
This patch is probably much better.
Comment 5 Emmanuele Bassi (:ebassi) 2012-02-15 11:33:29 UTC
Review of attachment 205986 [details] [review]:

I think we should move the xwin_width/height set near the cogl_onscreen_new() call instead of the end: it's semantically appropriate, and if we end up modifying realize in the future we don't end up risking adding functionality that depends on the size of the stage as stored by the ClutterStageX11 class.

I pushed your patch with this minor changed to master.
Comment 6 Emmanuele Bassi (:ebassi) 2012-02-15 11:37:26 UTC
Comment on attachment 204859 [details] [review]
Patch v1

Pushed attachment 2048509 to the clutter-1.8 branch