xdg shell: make unconstrain_from_box arg const
This commit is contained in:
parent
9192c0480a
commit
129e02b57d
|
@ -346,7 +346,7 @@ void wlr_xdg_popup_get_toplevel_coords(struct wlr_xdg_popup *popup,
|
||||||
* surface coordinate system.
|
* surface coordinate system.
|
||||||
*/
|
*/
|
||||||
void wlr_xdg_popup_unconstrain_from_box(struct wlr_xdg_popup *popup,
|
void wlr_xdg_popup_unconstrain_from_box(struct wlr_xdg_popup *popup,
|
||||||
struct wlr_box *toplevel_sx_box);
|
const struct wlr_box *toplevel_sx_box);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Invert the right/left anchor and gravity for this positioner. This can be
|
Invert the right/left anchor and gravity for this positioner. This can be
|
||||||
|
|
|
@ -400,7 +400,7 @@ void wlr_xdg_popup_get_toplevel_coords(struct wlr_xdg_popup *popup,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xdg_popup_box_constraints(struct wlr_xdg_popup *popup,
|
static void xdg_popup_box_constraints(struct wlr_xdg_popup *popup,
|
||||||
struct wlr_box *toplevel_sx_box, int *offset_x, int *offset_y) {
|
const struct wlr_box *toplevel_sx_box, int *offset_x, int *offset_y) {
|
||||||
int popup_width = popup->geometry.width;
|
int popup_width = popup->geometry.width;
|
||||||
int popup_height = popup->geometry.height;
|
int popup_height = popup->geometry.height;
|
||||||
int anchor_sx = 0, anchor_sy = 0;
|
int anchor_sx = 0, anchor_sy = 0;
|
||||||
|
@ -428,7 +428,7 @@ static void xdg_popup_box_constraints(struct wlr_xdg_popup *popup,
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool xdg_popup_unconstrain_flip(struct wlr_xdg_popup *popup,
|
static bool xdg_popup_unconstrain_flip(struct wlr_xdg_popup *popup,
|
||||||
struct wlr_box *toplevel_sx_box) {
|
const struct wlr_box *toplevel_sx_box) {
|
||||||
int offset_x = 0, offset_y = 0;
|
int offset_x = 0, offset_y = 0;
|
||||||
xdg_popup_box_constraints(popup, toplevel_sx_box,
|
xdg_popup_box_constraints(popup, toplevel_sx_box,
|
||||||
&offset_x, &offset_y);
|
&offset_x, &offset_y);
|
||||||
|
@ -478,7 +478,7 @@ static bool xdg_popup_unconstrain_flip(struct wlr_xdg_popup *popup,
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool xdg_popup_unconstrain_slide(struct wlr_xdg_popup *popup,
|
static bool xdg_popup_unconstrain_slide(struct wlr_xdg_popup *popup,
|
||||||
struct wlr_box *toplevel_sx_box) {
|
const struct wlr_box *toplevel_sx_box) {
|
||||||
int offset_x = 0, offset_y = 0;
|
int offset_x = 0, offset_y = 0;
|
||||||
xdg_popup_box_constraints(popup, toplevel_sx_box,
|
xdg_popup_box_constraints(popup, toplevel_sx_box,
|
||||||
&offset_x, &offset_y);
|
&offset_x, &offset_y);
|
||||||
|
@ -521,7 +521,7 @@ static bool xdg_popup_unconstrain_slide(struct wlr_xdg_popup *popup,
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool xdg_popup_unconstrain_resize(struct wlr_xdg_popup *popup,
|
static bool xdg_popup_unconstrain_resize(struct wlr_xdg_popup *popup,
|
||||||
struct wlr_box *toplevel_sx_box) {
|
const struct wlr_box *toplevel_sx_box) {
|
||||||
int offset_x, offset_y;
|
int offset_x, offset_y;
|
||||||
xdg_popup_box_constraints(popup, toplevel_sx_box,
|
xdg_popup_box_constraints(popup, toplevel_sx_box,
|
||||||
&offset_x, &offset_y);
|
&offset_x, &offset_y);
|
||||||
|
@ -552,7 +552,7 @@ static bool xdg_popup_unconstrain_resize(struct wlr_xdg_popup *popup,
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_xdg_popup_unconstrain_from_box(struct wlr_xdg_popup *popup,
|
void wlr_xdg_popup_unconstrain_from_box(struct wlr_xdg_popup *popup,
|
||||||
struct wlr_box *toplevel_sx_box) {
|
const struct wlr_box *toplevel_sx_box) {
|
||||||
if (xdg_popup_unconstrain_flip(popup, toplevel_sx_box)) {
|
if (xdg_popup_unconstrain_flip(popup, toplevel_sx_box)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue