Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

view: adjust position according to declared top left corner #365

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joggee-fr
Copy link
Collaborator

The XDG surface geometry includes an (x,y) coordinate indicating the top left corner of the window. Use this information to correctly set the view position.


Split from PR #278, it should fix issue #254.

The XDG surface geometry includes an (x,y) coordinate indicating the top
left corner of the window. Use this information to correctly set the
view position.
Comment on lines +67 to +72
struct wlr_box view_box;
view->impl->get_geometry(view, &view_box);

// Do not forget to adjust position according to top left corner declared in view geometry
view->lx = layout_box->x - view_box.x;
view->ly = layout_box->y - view_box.y;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I'm not sure this is the correct spot to read the window geometry. The window geometry is likely to change when the client redraws in the maximized state. This function runs before though, when we send the event to ask the client to redraw itself maximized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants