Tentative fix for multi-stage support on GLX
The fix for bug 1138 broke multi-stage support on GLX, causing X11 to segfault with the following stack trace: Backtrace: 0: /usr/X11R6/bin/X(xf86SigHandler+0x7e) [0x80c91fe] 1: [0xb7eea400] 2: /usr/lib/xorg/modules/extensions//libglx.so [0xb7ae880c] 3: /usr/lib/xorg/modules/extensions//libglx.so [0xb7aec0d6] 4: /usr/X11R6/bin/X [0x8154c24] 5: /usr/X11R6/bin/X(Dispatch+0x314) [0x808de54] 6: /usr/X11R6/bin/X(main+0x4b5) [0x8074795] 7: /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7c75775] 8: /usr/X11R6/bin/X(FontFileCompleteXLFD+0x21d) [0x8073a81] which I can only track down to clutter_backend_glx_ensure_current() being passed a NULL stage -- something that happens when a stage is not correct realized. That should lead to a glXMakeCurrent(None) and not to a segmentation fault, though.
This commit is contained in:
@ -304,8 +304,8 @@ void
|
||||
_clutter_backend_ensure_context (ClutterBackend *backend,
|
||||
ClutterStage *stage)
|
||||
{
|
||||
ClutterBackendClass *klass;
|
||||
static ClutterStage *current_context_stage = NULL;
|
||||
ClutterBackendClass *klass;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_BACKEND (backend));
|
||||
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
||||
@ -314,8 +314,16 @@ _clutter_backend_ensure_context (ClutterBackend *backend,
|
||||
{
|
||||
if (!CLUTTER_ACTOR_IS_REALIZED (stage))
|
||||
{
|
||||
CLUTTER_NOTE (MULTISTAGE, "Stage is not realized, unsetting");
|
||||
stage = NULL;
|
||||
CLUTTER_NOTE (MULTISTAGE,
|
||||
"Stage [%p] is not realized, realizing",
|
||||
stage);
|
||||
|
||||
/* if we are asked to ensure a particular stage we need
|
||||
* to make sure that is has been realized; calling
|
||||
* realized() twice in a row is cheap, since the method
|
||||
* will check first
|
||||
*/
|
||||
clutter_actor_realize (CLUTTER_ACTOR (stage));
|
||||
}
|
||||
else
|
||||
CLUTTER_NOTE (MULTISTAGE, "Setting the new stage [%p]", stage);
|
||||
|
Reference in New Issue
Block a user