<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - wayland: Warn when an application tries to map popup incorrectly"
href="https://bugzilla.gnome.org/show_bug.cgi?id=770745#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - wayland: Warn when an application tries to map popup incorrectly"
href="https://bugzilla.gnome.org/show_bug.cgi?id=770745">bug 770745</a>
from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ericwill%40redhat.com" title="Eric Williams <ericwill@redhat.com>"> <span class="fn">Eric Williams</span></a>
</span></b>
<pre>(In reply to Jonas Ã…dahl from <a href="show_bug.cgi?id=770745#c7">comment #7</a>)
<span class="quote">> (In reply to Eric Williams from <a href="show_bug.cgi?id=770745#c6">comment #6</a>)
> > What protocol does this violate? And why only on Wayland and not X11?
>
> The xdg-shell protocol. It doesn't violate anything on X11 because X11 is
> more of a "you're on your own" windowing system, while Wayland is much less
> so.
>
> >
> > I am dealing with a bug in SWT that is related to this fix -- if you could
> > explain the logic here it would help understand the issue further.
>
> The warning should happen when you map a popup (i.e. a popup menu that grabs
> input) above some other window that is not the top most popup or the
> toplevel.
>
> For example, lets say you have a toplevel window (e.g. the "main" window of
> your application) and an already open popup menu with the toplevel as a
> parent. Then you open another popup menu before closing the first one, but
> the new popup menu also has the toplevel window as the parent. In xdg-shell
> (the Wayland protocol that provides methods for creating "windows", "menus"
> etc), this is now allowed, since that would mean two menus would "grab" the
> same input device at the same time, which makes no sense.
>
> If you need to have multi level menus, what you need to do is to make sure
> that each new child menu is mapped with the old top most child menu as
> parent. If you are not using GtkMenu, you might be interested in <a class="bz_bug_link
bz_status_NEW "
title="NEW - Make gdk_window_move_to_rect() public"
href="show_bug.cgi?id=791845">bug 791845</a>.</span >
Okay thanks, this was very helpful. We could definitely make use of that public
API so I'll comment in that bug.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>