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 664052 - Do not use the default stage during initialization
Do not use the default stage during initialization
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks: 664028
 
 
Reported: 2011-11-14 16:28 UTC by Emmanuele Bassi (:ebassi)
Modified: 2011-12-15 21:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not use the default stage (25.02 KB, patch)
2011-11-21 20:26 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Emmanuele Bassi (:ebassi) 2011-11-14 16:28:17 UTC
The shell is referencing a ClutterStage before the Mutter plugin has been initialized - and it's relying on a set of side-effects that actually make it work.

The default stage has been deprecated in Clutter 1.9/1.10, but using the default stage prior to initialization of the Mutter plugin has never been future-proof — especially if we want to map different screens to different stages in the future.
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-11-21 20:26:26 UTC
Created attachment 201861 [details] [review]
Do not use the default stage
Comment 2 Emmanuele Bassi (:ebassi) 2011-11-22 01:29:03 UTC
Review of attachment 201861 [details] [review]:

looks okay to me.

::: src/st/test-theme.c
@@ +433,3 @@
                         NULL, NULL);
 
+  stage = clutter_stage_new ();

you probably want to connect to the destroy signal to quit the main loop.

::: src/test-recorder.c
@@ +37,3 @@
   clutter_color_from_string (&green, "green");
   clutter_color_from_string (&blue, "blue");
+  stage = clutter_stage_new ();

you probably want to connect to the destroy signal to quit the main loop.
Comment 3 Owen Taylor 2011-12-15 17:02:28 UTC
Review of attachment 201861 [details] [review]:

Looks good to commit, just a couple of cosmetics

::: src/shell-xfixes-cursor.c
@@ +322,3 @@
 /**
+ * shell_xfixes_cursor_get_for_stage:
+ * @stage: (transfer none): The #ClutterStage attached to the cursor

how is a stage attached to a cursor? we'd normally say something like "the #ClutterStage to get the cursor for"

@@ +333,3 @@
+
+  if (G_UNLIKELY (xfixes_cursor_quark == 0))
+    xfixes_cursor_quark = g_quark_from_static_string ("gnome-shelll::xfixes-cursor");

typo - shelll
I'd just do gnome-shell-xfixes-cursor .. don't see a point in more punctuation

::: src/st/test-theme.c
@@ +433,3 @@
                         NULL, NULL);
 
+  stage = clutter_stage_new ();

This test doesn't run the main loop, so I don't think a connection to quit the main loop is necessary

::: src/test-recorder.c
@@ +37,3 @@
   clutter_color_from_string (&green, "green");
   clutter_color_from_string (&blue, "blue");
+  stage = clutter_stage_new ();

Sort of unrelated, but would be fine to add the connection here
Comment 4 Jasper St. Pierre (not reading bugmail) 2011-12-15 21:14:35 UTC
Attachment 201861 [details] pushed as faff073 - Do not use the default stage


Pushed with suggested changes.