[PATCH v2] xwayland: Fix infinite loop on quick movement through menus

Tomasz Borowik timon37 at lavabit.com
Sun Apr 29 04:48:53 PDT 2012


On Fri, 27 Apr 2012 20:47:28 +0300
Tiago Vignatti <tiago.vignatti at linux.intel.com> wrote:

> On 04/25/2012 05:34 PM, Kristian Hoegsberg wrote:
> yep, this seems cool. I'm facing issues while implementing popup menu 
> now as well, but I'm not seeing any "infinite loop" as you described. 
> Anyways.
> 
Takes time and effort, it doesn't happen very often. I used konqueror and just moved through it's pulldown menus very fast for a about 5-30seconds;p Also you may not see it on weston depending on stuff like whether it blocks input on animations. We should probably make some x11 applications for testing stuff like this.

> I've made a little progress with xwayland, testing on both -intel and 
> -wlshm drivers. Here are the WIP trees:
> 
>      http://cgit.freedesktop.org/~vignatti/xserver/log/?h=xwayland-1.12
>      http://cgit.freedesktop.org/~vignatti/weston/log/?h=xserver
> 
> For tooltips, I took the Firefox's as example, and assumed that would 
> always have a parent window. But now I'm seeing this's wrong, because 
> for instance gnome-help have tooltips without parent. And that was a 
> really lame assumption of mine, because tooltips even don't need a 
> parent at all -- it follows the cursor. So what's the plan here? Do you 
> think we need to add set_tooltip for wl_shell_surface interface? I'm 
> interested also in hearing where we'll put UTILITY type of windows then.
> 

In my experience menus also don't have a parent, only a transient_for, but the xy coordinates in size_hints are set "global", which is quite troublesome especially with submenus.
The easiest solution is to just set the same position on x11 windows as in weston, and set the new weston windows to the global position.
The same is probably more or less true for tooltips.

I also have more issues with gtk menus, they seem to be checking xrandr to position/size the menu, though most issues arise on the radeon driver (it's reporting a connected output without modes). Either way if you see strange values like 1pix height in size_hints, assume it's gtk, qt/kde seems a bit nicer so testing on it is easier at first.

-- 
Tomasz Borowik <timon37 at lavabit.com>



More information about the wayland-devel mailing list