<div dir="ltr">Hi Robert,<div>It turns out the problem occurring stems from an issue with our creation of the X window and use of the clutter_x11_set_stage_foreign interface. We've encountered both fatal and non-fatal issues when this routine returns FALSE:</div>
<div><br></div><div>Our code:</div><div><div> if (clutter_x11_set_stage_foreign(CLUTTER_STAGE(stage), XWIN) == FALSE)</div><div> LOG_WARN(logger, "Failed to set foreign X window.");</div></div><div><br></div>
<div>We thought that a depth mismatch between the foreign window (our root window is 24 bpp and we are using CopyFromParent to create it) and the clutter initialized depth was <b>non</b>-<b>fatal </b>because everything seemed to work. However, what was really happening was that the foreign window was not set and clutter was creating its own window at 32 bpp. So there are two windows when there should be one. This caused problems trying to hide/suspend the app because the second window was still on top eating input.</div>
<div>As a hack to try to get it working we commented out the return FALSE below and then the foreign window is set successfully and the app seems to behave correctly with one window. Can you think of any gotchas from doing this? We're out of time to dig much deeper.</div>
<div><br></div><div>Thanks,</div><div>Reza</div><div><br></div><div>We are using clutter 1-14.2. Will upgrade someday.</div><div>clutter-stage-x11.c:</div><div><br></div><div><div> if (depth != xvisinfo->depth)</div><div>
{</div><div> g_warning ("The depth of the visual of the foreign window is %d, but "</div><div> "Clutter has been initialized to require a visual depth "</div><div> "of %d",</div>
<div> depth,</div><div> xvisinfo->depth);</div><div> /* return FALSE; */ </div><div> }</div></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 15, 2014 at 11:59 AM, Robert Bragg <span dir="ltr"><<a href="mailto:robert@sixbynine.org" target="_blank">robert@sixbynine.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Reza,<br>
<br>
Cogl creates a dummy 1x1 window positioned at (-100,-100) that is<br>
never mapped by Cogl. This is created because GLX doesn't let you<br>
interact with a GL context unless it is associated with a drawable and<br>
we want to interact with GL before your application explicitly creates<br>
a window/stage.<br>
<br>
I'm not sure why you would ever be seeing this window though, since it<br>
is never mapped by Cogl, so maybe the window you are seeing is created<br>
by something else. Also Cogl doesn't set any window manager hints to<br>
give that dummy window a title of "." so that also makes me guess this<br>
dummy window isn't made by Cogl. B.t.w how are you determining that<br>
the window is named "." are you seeing a window manager frame and<br>
title for that window? That certainly shouldn't happen for the Cogl<br>
dummy window, even if it did some how get mapped then the window is<br>
marked as override-redirect and so the window manager should basically<br>
ignore it.<br>
<br>
Perhaps you can set some breakpoints on XCreateWindow,<br>
XCreateSimpleWindow and XMapWindow to see what other things are<br>
creating X windows and mapping them.<br>
<br>
Regards,<br>
Robert<br>
<div class=""><div class="h5"><br>
<br>
On Tue, Apr 15, 2014 at 7:36 PM, Reza Ghassemi <<a href="mailto:reza.robin1@gmail.com">reza.robin1@gmail.com</a>> wrote:<br>
> Hi,<br>
> We have an issue where an X window named "." of the same size and position<br>
> of our main window is created when launching our Clutter app and we don't<br>
> know who is creating it. On this system we need to unmap this window along<br>
> with the main window when our app suspends itself to avoid input going to<br>
> this "dummy" which appears to be below our main window. I see some code in<br>
> the WGL implementation referring to a window named "." but not in EGL. Any<br>
> ideas?<br>
><br>
> We're kinda in a hurry to fix this.<br>
><br>
> Thanks,<br>
> Reza<br>
</div></div></blockquote></div><br></div></div>