mirror of
https://github.com/swaywm/sway.git
synced 2026-04-21 06:46:22 -04:00
Replace is_floating boolean with function
This commit is contained in:
parent
34f35f0bad
commit
aaba7642b3
12 changed files with 44 additions and 36 deletions
|
|
@ -1147,7 +1147,7 @@ void output_damage_whole_container(struct sway_output *output,
|
|||
.width = con->width,
|
||||
.height = con->height,
|
||||
};
|
||||
if (con->is_floating) {
|
||||
if (container_is_floating(con)) {
|
||||
box.x -= output->wlr_output->lx;
|
||||
box.y -= output->wlr_output->ly;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ static void handle_commit(struct wl_listener *listener, void *data) {
|
|||
view->natural_width = geometry->width;
|
||||
view->natural_height = geometry->height;
|
||||
}
|
||||
if (view->swayc && view->swayc->is_floating) {
|
||||
if (view->swayc && container_is_floating(view->swayc)) {
|
||||
view_update_size(view, geometry->width, geometry->height);
|
||||
} else {
|
||||
view_update_size(view, xdg_shell_view->pending_width,
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ static void handle_commit(struct wl_listener *listener, void *data) {
|
|||
view->natural_width = geometry->width;
|
||||
view->natural_height = geometry->height;
|
||||
}
|
||||
if (view->swayc && view->swayc->is_floating) {
|
||||
if (view->swayc && container_is_floating(view->swayc)) {
|
||||
view_update_size(view, geometry->width, geometry->height);
|
||||
} else {
|
||||
view_update_size(view, xdg_shell_v6_view->pending_width,
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ static void configure(struct sway_view *view, double x, double y, int width,
|
|||
struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface;
|
||||
|
||||
double lx, ly;
|
||||
if (view->swayc->is_floating) {
|
||||
if (container_is_floating(view->swayc)) {
|
||||
lx = x;
|
||||
ly = y;
|
||||
} else {
|
||||
|
|
@ -288,7 +288,7 @@ static void handle_commit(struct wl_listener *listener, void *data) {
|
|||
view->natural_width = xsurface->width;
|
||||
view->natural_height = xsurface->height;
|
||||
}
|
||||
if (view->swayc && view->swayc->is_floating) {
|
||||
if (view->swayc && container_is_floating(view->swayc)) {
|
||||
view_update_size(view, xsurface->width, xsurface->height);
|
||||
view_update_position(view, xsurface->x, xsurface->y);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue