mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
xdg_shell: remove variable self-assignment
This commit is contained in:
parent
8f3d73e3a3
commit
0695324de7
2 changed files with 4 additions and 12 deletions
|
@ -222,20 +222,16 @@ struct wlr_box wlr_xdg_positioner_get_geometry(
|
|||
if (positioner_gravity_has_edge(positioner->gravity,
|
||||
XDG_POSITIONER_GRAVITY_TOP)) {
|
||||
geometry.y -= geometry.height;
|
||||
} else if (positioner_gravity_has_edge(positioner->gravity,
|
||||
} else if (!positioner_gravity_has_edge(positioner->gravity,
|
||||
XDG_POSITIONER_GRAVITY_BOTTOM)) {
|
||||
geometry.y = geometry.y;
|
||||
} else {
|
||||
geometry.y -= geometry.height / 2;
|
||||
}
|
||||
|
||||
if (positioner_gravity_has_edge(positioner->gravity,
|
||||
XDG_POSITIONER_GRAVITY_LEFT)) {
|
||||
geometry.x -= geometry.width;
|
||||
} else if (positioner_gravity_has_edge(positioner->gravity,
|
||||
} else if (!positioner_gravity_has_edge(positioner->gravity,
|
||||
XDG_POSITIONER_GRAVITY_RIGHT)) {
|
||||
geometry.x = geometry.x;
|
||||
} else {
|
||||
geometry.x -= geometry.width / 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -154,17 +154,13 @@ struct wlr_box wlr_xdg_positioner_v6_get_geometry(
|
|||
|
||||
if (positioner->gravity & ZXDG_POSITIONER_V6_GRAVITY_TOP) {
|
||||
geometry.y -= geometry.height;
|
||||
} else if (positioner->gravity & ZXDG_POSITIONER_V6_GRAVITY_BOTTOM) {
|
||||
geometry.y = geometry.y;
|
||||
} else {
|
||||
} else if (!(positioner->gravity & ZXDG_POSITIONER_V6_GRAVITY_BOTTOM)) {
|
||||
geometry.y -= geometry.height / 2;
|
||||
}
|
||||
|
||||
if (positioner->gravity & ZXDG_POSITIONER_V6_GRAVITY_LEFT) {
|
||||
geometry.x -= geometry.width;
|
||||
} else if (positioner->gravity & ZXDG_POSITIONER_V6_GRAVITY_RIGHT) {
|
||||
geometry.x = geometry.x;
|
||||
} else {
|
||||
} else if (!(positioner->gravity & ZXDG_POSITIONER_V6_GRAVITY_RIGHT)) {
|
||||
geometry.x -= geometry.width / 2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue