mirror of
https://github.com/swaywm/sway.git
synced 2024-11-29 19:31:29 +00:00
Restore view_update_position()
This commit is contained in:
parent
19d6cc395d
commit
6ef14e99ee
|
@ -197,6 +197,8 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface);
|
||||||
|
|
||||||
void view_unmap(struct sway_view *view);
|
void view_unmap(struct sway_view *view);
|
||||||
|
|
||||||
|
void view_update_position(struct sway_view *view, double ox, double oy);
|
||||||
|
|
||||||
void view_update_size(struct sway_view *view, int width, int height);
|
void view_update_size(struct sway_view *view, int width, int height);
|
||||||
|
|
||||||
void view_child_init(struct sway_view_child *child,
|
void view_child_init(struct sway_view_child *child,
|
||||||
|
|
|
@ -349,6 +349,19 @@ void view_unmap(struct sway_view *view) {
|
||||||
arrange_children_of(parent);
|
arrange_children_of(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void view_update_position(struct sway_view *view, double ox, double oy) {
|
||||||
|
if (view->swayc->x == ox && view->swayc->y == oy) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Only allow this if the view is floating (this function will only be
|
||||||
|
// called in response to wayland clients wanting to reposition themselves).
|
||||||
|
view_damage(view, true);
|
||||||
|
view->swayc->x = ox;
|
||||||
|
view->swayc->y = oy;
|
||||||
|
view_damage(view, true);
|
||||||
|
}
|
||||||
|
|
||||||
void view_update_size(struct sway_view *view, int width, int height) {
|
void view_update_size(struct sway_view *view, int width, int height) {
|
||||||
if (view->width == width && view->height == height) {
|
if (view->width == width && view->height == height) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue