Skip to content

Commit

Permalink
#164 tidy names
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-courtis committed Dec 23, 2024
1 parent 5bc00bb commit 68a58ac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
8 changes: 3 additions & 5 deletions inc/displ.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "cfg.h"
#include "head.h"

enum ConfigState {
enum DisplState {
IDLE = 0,
SUCCEEDED,
OUTSTANDING,
Expand All @@ -20,16 +20,14 @@ enum ConfigState {
};

struct DisplDelta {
enum CfgElement element; // VRR_OFF indicates toggle
enum CfgElement element; // 0 for many changes, VRR_OFF indicates toggle

// only when element set
struct Head *head;

char *human;
};

extern struct LayoutDelta layout_delta;

struct Displ {
// global
struct wl_registry *registry;
Expand All @@ -48,7 +46,7 @@ struct Displ {
uint32_t zxdg_output_manager_version;
char *zxdg_output_manager_interface;

enum ConfigState state;
enum DisplState state;
struct DisplDelta delta;
};

Expand Down
6 changes: 3 additions & 3 deletions inc/info.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ void info_user_mode_string(struct UserMode *user_mode, char *buf, size_t nbuf);
void info_mode_string(struct Mode *mode, char *buf, size_t nbuf);

// LEN_HUMAN, consumer frees
char *delta_human(const enum ConfigState state, const struct SList * const heads);
char *delta_human(const enum DisplState state, const struct SList * const heads);

// LEN_HUMAN, consumer frees
char *delta_human_mode(const enum ConfigState state, const struct Head * const head);
char *delta_human_mode(const enum DisplState state, const struct Head * const head);

// LEN_HUMAN, consumer frees
char *delta_human_adaptive_sync(const enum ConfigState state, const struct Head * const head);
char *delta_human_adaptive_sync(const enum DisplState state, const struct Head * const head);

#endif // INFO_H

6 changes: 3 additions & 3 deletions src/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ void print_heads(enum LogThreshold t, enum InfoEvent event, struct SList *heads)
}
}

char *delta_human(const enum ConfigState state, const struct SList * const heads) {
char *delta_human(const enum DisplState state, const struct SList * const heads) {
if (!heads) {
return NULL;
}
Expand Down Expand Up @@ -504,7 +504,7 @@ char *delta_human(const enum ConfigState state, const struct SList * const heads
return buf;
}

char *delta_human_mode(const enum ConfigState state, const struct Head * const head) {
char *delta_human_mode(const enum DisplState state, const struct Head * const head) {
if (!head) {
return NULL;
}
Expand Down Expand Up @@ -540,7 +540,7 @@ char *delta_human_mode(const enum ConfigState state, const struct Head * const h
}


char *delta_human_adaptive_sync(const enum ConfigState state, const struct Head * const head) {
char *delta_human_adaptive_sync(const enum DisplState state, const struct Head * const head) {
if (!head) {
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/listener_zwlr_output_configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

void cleanup(struct Displ *displ,
struct zwlr_output_configuration_v1 *zwlr_output_configuration_v1,
enum ConfigState state) {
enum DisplState state) {

for (struct SList *i = heads; i; i = i->nex) {
struct Head *head = i->val;
Expand Down

0 comments on commit 68a58ac

Please sign in to comment.