mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
src: put designated initializers in member order
Out-of-order named initializers are allowed in C (unlike in C++) but are still surprising - I don't see a reason not to put them in order.
This commit is contained in:
parent
a802d6b20a
commit
4afbfac528
4 changed files with 16 additions and 16 deletions
|
|
@ -283,8 +283,8 @@ subtract_view_from_space(struct view *view, pixman_region32_t *available)
|
|||
struct wlr_box view_size = ssd_max_extents(view);
|
||||
pixman_box32_t view_rect = {
|
||||
.x1 = view_size.x,
|
||||
.x2 = view_size.x + view_size.width,
|
||||
.y1 = view_size.y,
|
||||
.x2 = view_size.x + view_size.width,
|
||||
.y2 = view_size.y + view_size.height
|
||||
};
|
||||
|
||||
|
|
@ -431,10 +431,10 @@ edges_find_neighbors(struct border *nearest_edges, struct view *view,
|
|||
|
||||
struct border win_edges = {
|
||||
.top = v->current.y - border.top,
|
||||
.left = v->current.x - border.left,
|
||||
.right = v->current.x + v->current.width + border.right,
|
||||
.bottom = v->current.y + border.bottom
|
||||
+ view_effective_height(v, /* use_pending */ false),
|
||||
.right = v->current.x + v->current.width + border.right,
|
||||
.left = v->current.x - border.left,
|
||||
};
|
||||
|
||||
validate_edges(nearest_edges, view_edges,
|
||||
|
|
|
|||
|
|
@ -224,13 +224,13 @@ update_popup_position(struct input_method_popup *popup)
|
|||
.anchor_rect = cursor_rect,
|
||||
.anchor = XDG_POSITIONER_ANCHOR_BOTTOM_LEFT,
|
||||
.gravity = XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT,
|
||||
.constraint_adjustment =
|
||||
XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y
|
||||
| XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X,
|
||||
.size = {
|
||||
.width = popup->popup_surface->surface->current.width,
|
||||
.height = popup->popup_surface->surface->current.height,
|
||||
},
|
||||
.constraint_adjustment =
|
||||
XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y
|
||||
| XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X,
|
||||
};
|
||||
|
||||
struct wlr_box popup_box;
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ ssd_thickness(struct view *view)
|
|||
|
||||
struct border thickness = {
|
||||
.top = theme->titlebar_height + theme->border_width,
|
||||
.right = theme->border_width,
|
||||
.bottom = theme->border_width,
|
||||
.left = theme->border_width,
|
||||
.right = theme->border_width,
|
||||
};
|
||||
|
||||
if (view->ssd_titlebar_hidden) {
|
||||
|
|
|
|||
18
src/theme.c
18
src/theme.c
|
|
@ -289,49 +289,49 @@ load_buttons(struct theme *theme)
|
|||
{
|
||||
struct button buttons[] = { {
|
||||
.name = "menu",
|
||||
.fallback_button = (const char[]){ 0x00, 0x21, 0x33, 0x1E, 0x0C, 0x00 },
|
||||
.type = LAB_SSD_BUTTON_WINDOW_MENU,
|
||||
.state_set = 0,
|
||||
.fallback_button = (const char[]){ 0x00, 0x21, 0x33, 0x1E, 0x0C, 0x00 },
|
||||
}, {
|
||||
.name = "iconify",
|
||||
.fallback_button = (const char[]){ 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f },
|
||||
.type = LAB_SSD_BUTTON_ICONIFY,
|
||||
.state_set = 0,
|
||||
.fallback_button = (const char[]){ 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f },
|
||||
}, {
|
||||
.name = "max",
|
||||
.fallback_button = (const char[]){ 0x3f, 0x3f, 0x21, 0x21, 0x21, 0x3f },
|
||||
.type = LAB_SSD_BUTTON_MAXIMIZE,
|
||||
.state_set = 0,
|
||||
.fallback_button = (const char[]){ 0x3f, 0x3f, 0x21, 0x21, 0x21, 0x3f },
|
||||
}, {
|
||||
.name = "max_toggled",
|
||||
.fallback_button = (const char[]){ 0x3e, 0x22, 0x2f, 0x29, 0x39, 0x0f },
|
||||
.type = LAB_SSD_BUTTON_MAXIMIZE,
|
||||
.state_set = LAB_BS_TOGGLED,
|
||||
.fallback_button = (const char[]){ 0x3e, 0x22, 0x2f, 0x29, 0x39, 0x0f },
|
||||
}, {
|
||||
.name = "shade",
|
||||
.fallback_button = (const char[]){ 0x3f, 0x3f, 0x00, 0x0c, 0x1e, 0x3f },
|
||||
.type = LAB_SSD_BUTTON_SHADE,
|
||||
.state_set = 0,
|
||||
.fallback_button = (const char[]){ 0x3f, 0x3f, 0x00, 0x0c, 0x1e, 0x3f },
|
||||
}, {
|
||||
.name = "shade_toggled",
|
||||
.fallback_button = (const char[]){ 0x3f, 0x3f, 0x00, 0x3f, 0x1e, 0x0c },
|
||||
.type = LAB_SSD_BUTTON_SHADE,
|
||||
.state_set = LAB_BS_TOGGLED,
|
||||
.fallback_button = (const char[]){ 0x3f, 0x3f, 0x00, 0x3f, 0x1e, 0x0c },
|
||||
}, {
|
||||
.name = "desk",
|
||||
.fallback_button = (const char[]){ 0x33, 0x33, 0x00, 0x00, 0x33, 0x33 },
|
||||
.type = LAB_SSD_BUTTON_OMNIPRESENT,
|
||||
.state_set = 0,
|
||||
.fallback_button = (const char[]){ 0x33, 0x33, 0x00, 0x00, 0x33, 0x33 },
|
||||
}, {
|
||||
.name = "desk_toggled",
|
||||
.fallback_button = (const char[]){ 0x00, 0x1e, 0x1a, 0x16, 0x1e, 0x00 },
|
||||
.type = LAB_SSD_BUTTON_OMNIPRESENT,
|
||||
.state_set = LAB_BS_TOGGLED,
|
||||
.fallback_button = (const char[]){ 0x00, 0x1e, 0x1a, 0x16, 0x1e, 0x00 },
|
||||
}, {
|
||||
.name = "close",
|
||||
.fallback_button = (const char[]){ 0x33, 0x3f, 0x1e, 0x1e, 0x3f, 0x33 },
|
||||
.type = LAB_SSD_BUTTON_CLOSE,
|
||||
.state_set = 0,
|
||||
.fallback_button = (const char[]){ 0x33, 0x3f, 0x1e, 0x1e, 0x3f, 0x33 },
|
||||
}, {
|
||||
.name = "menu_hover",
|
||||
.type = LAB_SSD_BUTTON_WINDOW_MENU,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue