[Spice-devel] [PATCH] RFC: client/x11: reuse existing platform_win

Marc-André Lureau marcandre.lureau at gmail.com
Thu Jul 28 09:56:18 PDT 2011


Hi

On Thu, Jul 28, 2011 at 6:43 PM, Alon Levy <alevy at redhat.com> wrote:
> On Thu, Jul 28, 2011 at 06:01:53PM +0200, Marc-André Lureau wrote:
>> Each time a {Dynamic,MultyMon}Scren is created, a new platform_win is
>> created to receive the notifications from X11. This looks very
>> suspicious already. Since I am not a xlib expert, I suppose that each
>> window will receive X11 events.
>>
>> Whenever XRR ScreenChangeNotify event is received (caused by external
>> process), init_monitors() is called and this will recreate new
>> platform_wins. And sometime, this event happen in a loop and Xorg
>> takes 100% cpu. If only one platform_win is used, the loop doesn't
>> happen for me, but seem to still happen for others.
>>
>> Related bug:
>> https://bugzilla.redhat.com/show_bug.cgi?id=692833
>
> Looks like a good catch. I just wonder if there is no time that platform_win
> needs to be invalidated?
>
> Maybe the fix is to destroy the old and then create another?

I don't see why we should do that, it doesn't seem to be referenced
with {Dynamic,MultyMon}Screen in any way.

In fact, it would probably be best to extract completely that
platform_win stuff outside of the Screen class, and make it part of
platform_{init,finish} or whatever fits that.

-- 
Marc-André Lureau


More information about the Spice-devel mailing list