Window placement
Jasper St. Pierre
jstpierre at mecheye.net
Tue Jul 1 12:57:25 PDT 2014
No, you don't.
You cannot possibly reuse the saved settings on different OSes with
different output layouts. On Windows, there's a taskbar at the bottom (yes,
it's technically configurable, I know). On OS X, there's a menu bar at the
top. You have no idea what windows are around you and where they are. You
don't know where Firefox is, or where to place your window so that it
doesn't overlap. You don't even know which monitor the cursor was on, so if
you wanted to pop up your dialog in the middle of the screen so that the
user didn't have to cross two monitors to get to it, you could position it
OK.
In isolation, you could get away with things. The user has multiple apps
open, the desktops have different layouts, the UI conventions are different
across platforms, and you're not sure where the monitors are. You cannot
know these things.
The issue with the "the window should be placed here" hint you suggest is
that you say it's completely valid for me to ignore it, but you will
complain if my compositor ignores it, because your requirement is "the
window needs to be placed here". Well, buddy, there's a taskbar in the way
there. I can't place it there even if you wanted me to. And thus I will
push your window down, and your toolbox is now overlapping the primary
window by ten pixels.
It sounds like you have a highly technical workstation platform that has a
complex, professional tool involving multiple windows, and you are fully
aware of your environment. You can keep using X11 for this use case if you
want.
On Tue, Jul 1, 2014 at 3:48 PM, Bill Spitzak <spitzak at gmail.com> wrote:
> On 06/30/2014 11:36 PM, Pekka Paalanen wrote:
>
> One idea was that the client can ask the compositor to create a
>> cookie (a blob) that the client can save, and when restoring the
>> window, give the cookie back to the compositor to recall the position
>> and size, subject to the compositor checking if it makes sense
>> (e.g. avoid putting windows in unreachable places) and adjusting as
>> necessary. It is a blob rather than (x,y,w,h,a,r,g,...) tuple, so that
>> different compositors can save all the compositor-specific data too,
>> like rotation angles. Also, the blob is to prevent clients from abusing
>> the recall mechanism to position windows in global coordinates. But
>> that's just one idea.
>>
>
> That solution cannot work as we need the ability to reuse the saved
> settings on Windows and X and OS/X and also on different Wayland
> compositors.
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
--
Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140701/a8157719/attachment.html>
More information about the wayland-devel
mailing list