mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-14 05:34:21 -04:00
opt: change unsigned int to uint32_t
This commit is contained in:
parent
9196e2a50b
commit
b9952f03b5
20 changed files with 314 additions and 329 deletions
|
|
@ -8,7 +8,7 @@ typedef struct Monitor Monitor;
|
|||
|
||||
struct workspace {
|
||||
struct wl_list link; // Link in global workspaces list
|
||||
unsigned int tag; // Numeric identifier (1-9, 0=overview)
|
||||
uint32_t tag; // Numeric identifier (1-9, 0=overview)
|
||||
Monitor *m; // Associated monitor
|
||||
struct wlr_ext_workspace_handle_v1 *ext_workspace; // Protocol object
|
||||
/* Event listeners */
|
||||
|
|
@ -22,7 +22,7 @@ struct wlr_ext_workspace_manager_v1 *ext_manager;
|
|||
struct wl_list workspaces;
|
||||
|
||||
void goto_workspace(struct workspace *target) {
|
||||
unsigned int tag;
|
||||
uint32_t tag;
|
||||
tag = 1 << (target->tag - 1);
|
||||
if (target->tag == 0) {
|
||||
toggleoverview(&(Arg){.i = -1});
|
||||
|
|
@ -33,7 +33,7 @@ void goto_workspace(struct workspace *target) {
|
|||
}
|
||||
|
||||
void toggle_workspace(struct workspace *target) {
|
||||
unsigned int tag;
|
||||
uint32_t tag;
|
||||
tag = 1 << (target->tag - 1);
|
||||
if (target->tag == 0) {
|
||||
toggleview(&(Arg){.i = -1});
|
||||
|
|
@ -69,7 +69,7 @@ static void handle_ext_workspace_deactivate(struct wl_listener *listener,
|
|||
wlr_log(WLR_INFO, "ext deactivating workspace %d", workspace->tag);
|
||||
}
|
||||
|
||||
static const char *get_name_from_tag(unsigned int tag) {
|
||||
static const char *get_name_from_tag(uint32_t tag) {
|
||||
static const char *names[] = {"overview", "1", "2", "3", "4",
|
||||
"5", "6", "7", "8", "9"};
|
||||
return (tag < sizeof(names) / sizeof(names[0])) ? names[tag] : NULL;
|
||||
|
|
@ -92,7 +92,7 @@ void cleanup_workspaces_by_monitor(Monitor *m) {
|
|||
}
|
||||
}
|
||||
|
||||
static void remove_workspace_by_tag(unsigned int tag, Monitor *m) {
|
||||
static void remove_workspace_by_tag(uint32_t tag, Monitor *m) {
|
||||
struct workspace *workspace, *tmp;
|
||||
wl_list_for_each_safe(workspace, tmp, &workspaces, link) {
|
||||
if (workspace->tag == tag && workspace->m == m) {
|
||||
|
|
@ -127,7 +127,7 @@ static void add_workspace_by_tag(int tag, Monitor *m) {
|
|||
|
||||
void dwl_ext_workspace_printstatus(Monitor *m) {
|
||||
struct workspace *w;
|
||||
unsigned int tag_status = 0;
|
||||
uint32_t tag_status = 0;
|
||||
|
||||
wl_list_for_each(w, &workspaces, link) {
|
||||
if (w && w->m == m) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue