Window placement

Fabrice Rey fabounet03 at gmail.com
Tue Jul 1 15:39:43 PDT 2014


> "When the keyboard and mouse focus are the same surface then relative
coordinates for the popup can be used"

There is no window having focus here. Or maybe there is, but it's not the
surface of the "circular menu", which is hidden, and only appears when
pressing a shortkey (about global shortkeys, that's another point I'll come
back to later, let's assume we can have global shortkeys on Wayland for
now).


2014-07-01 21:57 GMT+02:00 Bill Spitzak <spitzak at gmail.com>:

>
>
> On 07/01/2014 11:52 AM, Fabrice Rey wrote:
>
>> Here is another problem (and sorry for my numerous messages,
>>   I've just though of this one now) :-)
>> I have an application that pops up a menu when pressing a shortkey.
>> It's a circular menu (it actually really exists such an application), so
>> it should pop with its center right on the cursor.
>> So here we don't need global coordinates, but to tell the compositor to
>> place the window relatively to the cursor.
>> Since there is only the possibility to place a window relatively to its
>> parent, how would we achieve a good placement ?
>>
>
> When the keyboard and mouse focus are the same surface then relative
> coordinates for the popup can be used. This will more accurately place the
> menu where the mouse was when the shortcut was pressed, rather than a race
> condition where the mouse may have moved some since the shortcut was sent
> to the client.
>
> I'm not sure what to do if they are different surfaces. Apps that work
> this way (for instance the Space bar in Maya) tend to work best in
> point-to-type mode so they are always the same surface. Possibly this means
> the keyboard focus surface needs to get all the move events.
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140702/97498045/attachment.html>


More information about the wayland-devel mailing list