MapNotify Event Is not received by the client after XMapWindow

Olivier Fourdan ofourdan at redhat.com
Mon Apr 29 07:57:32 UTC 2019


Hi

On Mon, Apr 29, 2019 at 9:41 AM Ikshwaku Chauhan <ikshwaku.ec2004 at gmail.com>
wrote:

> Hello All,
>
>
> We are using Xorg version 1.14 and layermanger 1.1 with chromium browser
> on NXP i.MX6 platform.
> In one of our usecase chromium browser is crashing and we have found that,
> this happens after XMapWindow api is called and browser is waiting for
> MapNotify event with XWindowEvent call. Browser is waiting for MapNotify
> event but XWindowEvent is not returning and which results browser crash
> after sometime.
> In our environment multiple X based apps are working
>
> Could anyone know about this issue? or having same insight about this
> behavior?
> Please provide you inputs.
>

Waiting for the first MapNotify event before drawing to the window is the
correct way (e.g. [1]).

You can easily check that the MapNotify event is emitted after the initial
MapRequest using xev, e.g.:

```
    $ xev
    Outer window is 0x1000001, inner window is 0x1000002
    [...]
    CreateNotify event, serial 11, synthetic NO, window 0x1000001,
        parent 0x1000001, window 0x1000002, (10,10), width 50, height 50
    border_width 4, override NO

    PropertyNotify event, serial 14, synthetic NO, window 0x1000001,
        atom 0xff (WM_PROTOCOLS), time 931817426, state PropertyNewValue

    MapNotify event, serial 15, synthetic NO, window 0x1000001,
        event 0x1000001, window 0x1000002, override NO

    ConfigureNotify event, serial 28, synthetic NO, window 0x1000001,
    [...]
```

If you get that MapNotify event with xev on first map request, then chances
are the bug is not in the Xserver (I would be surprised if it were).

HTH,
Cheers,
Olivier

[1] https://tronche.com/gui/x/xlib-tutorial/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20190429/02da24f0/attachment.html>


More information about the xorg-devel mailing list