libwayland surface coordinate question

Ken C therealkenc at gmail.com
Fri Nov 22 01:40:36 UTC 2019


I am just starting out with libweston and have a beginner question
regarding surface/view coordinates. I am looking to implement
something along the lines of issue #277 on gitlab[1], "New shell
plugin for single-app usecases". I have swapped out
weston-desktop-shell with a toy client just to get grounded, and am
using the X11 and RDP backends for testing. I can see where the
initial client position gets set up in
weston_view_set_initial_position() in shell.c. However I am finding
that even if weston_view_set_position() is called with {0,0}, the
resulting window on output is offset by ~32ish pixels. I've also
started from westiny[2], which is about as simple as it gets, but find
the same mysterious (to me) offset. I can set the initial position to
a negative x,y value in weston_view_set_initial_position(), forcing
the window into the corner. Maximizing the toy client interestingly
enough fills the screen (a single head).

I've looked high and low for where that ~32 pixel offset comes from,
but have not had luck. While I look some more maybe someone has a
quick pointer. If I can set a breakpoint I'm sure it will become
obvious.

[1] https://gitlab.freedesktop.org/wayland/weston/issues/277
[2] https://gitlab.freedesktop.org/daniels/westiny/blob/master/westiny.c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20191121/f54dab36/attachment.html>


More information about the wayland-devel mailing list