mirror of
https://github.com/labwc/labwc.git
synced 2026-03-30 11:10:41 -04:00
deco.c: add enum end-marker
This commit is contained in:
parent
625722cb66
commit
97c29987e2
2 changed files with 4 additions and 4 deletions
|
|
@ -92,7 +92,8 @@ struct output {
|
||||||
enum view_type { LAB_XDG_SHELL_VIEW, LAB_XWAYLAND_VIEW };
|
enum view_type { LAB_XDG_SHELL_VIEW, LAB_XWAYLAND_VIEW };
|
||||||
|
|
||||||
enum deco_part {
|
enum deco_part {
|
||||||
LAB_DECO_BUTTON_CLOSE = 0,
|
LAB_DECO_NONE = 0,
|
||||||
|
LAB_DECO_BUTTON_CLOSE,
|
||||||
LAB_DECO_BUTTON_MAXIMIZE,
|
LAB_DECO_BUTTON_MAXIMIZE,
|
||||||
LAB_DECO_BUTTON_ICONIFY,
|
LAB_DECO_BUTTON_ICONIFY,
|
||||||
LAB_DECO_PART_TITLE,
|
LAB_DECO_PART_TITLE,
|
||||||
|
|
@ -100,8 +101,7 @@ enum deco_part {
|
||||||
LAB_DECO_PART_RIGHT,
|
LAB_DECO_PART_RIGHT,
|
||||||
LAB_DECO_PART_BOTTOM,
|
LAB_DECO_PART_BOTTOM,
|
||||||
LAB_DECO_PART_LEFT,
|
LAB_DECO_PART_LEFT,
|
||||||
LAB_DECO_NONE
|
LAB_DECO_END_MARKER
|
||||||
/* Keep LAB_DECO_NONE last as iteration end-marker */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct view_impl {
|
struct view_impl {
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ struct wlr_box deco_box(struct view *view, enum deco_part deco_part)
|
||||||
enum deco_part deco_at(struct view *view, double lx, double ly)
|
enum deco_part deco_at(struct view *view, double lx, double ly)
|
||||||
{
|
{
|
||||||
enum deco_part deco_part;
|
enum deco_part deco_part;
|
||||||
for (deco_part = 0; deco_part < LAB_DECO_NONE; ++deco_part) {
|
for (deco_part = 0; deco_part < LAB_DECO_END_MARKER; ++deco_part) {
|
||||||
struct wlr_box box = deco_box(view, deco_part);
|
struct wlr_box box = deco_box(view, deco_part);
|
||||||
if (wlr_box_contains_point(&box, lx, ly))
|
if (wlr_box_contains_point(&box, lx, ly))
|
||||||
return deco_part;
|
return deco_part;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue