[PATCH weston v2 04/24] xwayland: detect initially positioned X11 windows

Pekka Paalanen ppaalanen at gmail.com
Wed Dec 21 15:27:36 UTC 2016


On Wed, 21 Dec 2016 14:56:11 +0000
Daniel Stone <daniel at fooishbar.org> wrote:

> Hi Pekka,
> 
> On 21 December 2016 at 14:40, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > @@ -2500,6 +2510,17 @@ legacy_fullscreen(struct weston_wm *wm,
> >  }
> >
> >  static bool
> > +weston_wm_window_is_positioned(struct weston_wm_window *window)
> > +{
> > +       if (window->map_request_x == INT_MIN ||
> > +           window->map_request_y == INT_MIN)
> > +               weston_log("XWM warning: win %d did not see map request\n",
> > +                          window->id);
> > +
> > +       return window->map_request_x != 0 || window->map_request_y != 0;
> > +}  
> 
> Er, doesn't this break windows explicitly positioned at the origin?
> And I may be wrong, but won't OR windows avoid MapRequest to the WM,
> meaning that every OR window mapped would trigger this warning?
> 
> I'd assume this should just be 'return window->map_request_x !=
> INT_MIN || window->map_request_y != INT_MIN;' ...

Hi,

if you look at the caller:
- this is (supposedly) never called for OR windows
- legacy fullscreen windows (manually positioned at 0,0) get detected
  before this is called (either in xserver_map_shell_surface or after a
  later patch in MapRequest handler), so this will not be called.

You are right that positioning a normal window at 0,0 is not possible.
I do not know how to detect a window positioned at 0,0 from a window
without a position explicitly set. Any idea?

The map_request values are only unset if the MapRequest handler does
not run, i.e. for OR windows.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20161221/5a64f7a0/attachment.sig>


More information about the wayland-devel mailing list