change: correct dispatch name minized to minimized,restore_minized to restore_minimized

This commit is contained in:
DreamMaoMao 2025-09-05 14:22:10 +08:00
parent c7b0e2e6c8
commit ace0993662
6 changed files with 19 additions and 19 deletions

View file

@ -170,9 +170,9 @@ bind=ALT,backslash,togglefloating,
bind=ALT,a,togglemaxmizescreen, bind=ALT,a,togglemaxmizescreen,
bind=ALT,f,togglefullscreen, bind=ALT,f,togglefullscreen,
bind=ALT+SHIFT,f,togglefakefullscreen, bind=ALT+SHIFT,f,togglefakefullscreen,
bind=SUPER,i,minized, bind=SUPER,i,minimized,
bind=SUPER,o,toggleoverlay, bind=SUPER,o,toggleoverlay,
bind=SUPER+SHIFT,I,restore_minized bind=SUPER+SHIFT,I,restore_minimized
bind=ALT,z,toggle_scratchpad bind=ALT,z,toggle_scratchpad
# scroller layout # scroller layout

View file

@ -730,10 +730,10 @@ FuncType parse_func_name(char *func_name, Arg *arg, char *arg_value,
func = togglefakefullscreen; func = togglefakefullscreen;
} else if (strcmp(func_name, "toggleoverlay") == 0) { } else if (strcmp(func_name, "toggleoverlay") == 0) {
func = toggleoverlay; func = toggleoverlay;
} else if (strcmp(func_name, "minized") == 0) { } else if (strcmp(func_name, "minimized") == 0) {
func = minized; func = minimized;
} else if (strcmp(func_name, "restore_minized") == 0) { } else if (strcmp(func_name, "restore_minimized") == 0) {
func = restore_minized; func = restore_minimized;
} else if (strcmp(func_name, "toggle_scratchpad") == 0) { } else if (strcmp(func_name, "toggle_scratchpad") == 0) {
func = toggle_scratchpad; func = toggle_scratchpad;
} else if (strcmp(func_name, "toggle_render_border") == 0) { } else if (strcmp(func_name, "toggle_render_border") == 0) {

View file

@ -1,5 +1,5 @@
void minized(const Arg *arg); void minimized(const Arg *arg);
void restore_minized(const Arg *arg); void restore_minimized(const Arg *arg);
void toggle_scratchpad(const Arg *arg); void toggle_scratchpad(const Arg *arg);
void focusdir(const Arg *arg); void focusdir(const Arg *arg);
void toggleoverview(const Arg *arg); void toggleoverview(const Arg *arg);

View file

@ -387,7 +387,7 @@ void resizewin(const Arg *arg) {
c->oldgeom = c->geom; c->oldgeom = c->geom;
resize(c, c->geom, 0); resize(c, c->geom, 0);
} }
void restore_minized(const Arg *arg) { void restore_minimized(const Arg *arg) {
Client *c; Client *c;
if (selmon && selmon->sel && selmon->sel->is_in_scratchpad && if (selmon && selmon->sel && selmon->sel->is_in_scratchpad &&
selmon->sel->is_scratchpad_show) { selmon->sel->is_scratchpad_show) {
@ -1029,7 +1029,7 @@ void toggle_scratchpad(const Arg *arg) {
} }
if (single_scratchpad && c->isnamedscratchpad && !c->isminied) { if (single_scratchpad && c->isnamedscratchpad && !c->isminied) {
set_minized(c); set_minimized(c);
continue; continue;
} }

View file

@ -10,7 +10,7 @@ void handle_foreign_activate_request(struct wl_listener *listener, void *data) {
return; return;
if (c && !c->isminied && c == selmon->sel) { if (c && !c->isminied && c == selmon->sel) {
set_minized(c); set_minimized(c);
return; return;
} }

View file

@ -616,7 +616,7 @@ unsigned int want_restore_fullscreen(Client *target_client);
static void overview_restore(Client *c, const Arg *arg); static void overview_restore(Client *c, const Arg *arg);
static void overview_backup(Client *c); static void overview_backup(Client *c);
static int applyrulesgeom(Client *c); static int applyrulesgeom(Client *c);
static void set_minized(Client *c); static void set_minimized(Client *c);
static void show_scratchpad(Client *c); static void show_scratchpad(Client *c);
static void show_hide_client(Client *c); static void show_hide_client(Client *c);
@ -872,9 +872,9 @@ void clear_fullscreen_flag(Client *c) {
} }
} }
void minized(const Arg *arg) { void minimized(const Arg *arg) {
if (selmon->sel && !selmon->sel->isminied) { if (selmon->sel && !selmon->sel->isminied) {
set_minized(selmon->sel); set_minimized(selmon->sel);
} }
} }
@ -957,7 +957,7 @@ bool switch_scratchpad_client_state(Client *c) {
return true; return true;
} else if (c->is_in_scratchpad && c->is_scratchpad_show && } else if (c->is_in_scratchpad && c->is_scratchpad_show &&
(selmon->tagset[selmon->seltags] & c->tags) != 0) { (selmon->tagset[selmon->seltags] & c->tags) != 0) {
set_minized(c); set_minimized(c);
return true; return true;
} else if (c && c->is_in_scratchpad && !c->is_scratchpad_show) { } else if (c && c->is_in_scratchpad && !c->is_scratchpad_show) {
show_scratchpad(c); show_scratchpad(c);
@ -975,12 +975,12 @@ void apply_named_scratchpad(Client *target_client) {
} }
if (single_scratchpad && c->is_in_scratchpad && c->is_scratchpad_show && if (single_scratchpad && c->is_in_scratchpad && c->is_scratchpad_show &&
c != target_client) { c != target_client) {
set_minized(c); set_minimized(c);
} }
} }
if (!target_client->is_in_scratchpad) { if (!target_client->is_in_scratchpad) {
set_minized(target_client); set_minimized(target_client);
switch_scratchpad_client_state(target_client); switch_scratchpad_client_state(target_client);
} else } else
switch_scratchpad_client_state(target_client); switch_scratchpad_client_state(target_client);
@ -3524,7 +3524,7 @@ maximizenotify(struct wl_listener *listener, void *data) {
setmaxmizescreen(c, 1); setmaxmizescreen(c, 1);
} }
void set_minized(Client *c) { void set_minimized(Client *c) {
if (!c || !c->mon) if (!c || !c->mon)
return; return;
@ -3567,7 +3567,7 @@ minimizenotify(struct wl_listener *listener, void *data) {
if (client_request_minimize(c, data)) { if (client_request_minimize(c, data)) {
if (!c->ignore_minimize) if (!c->ignore_minimize)
set_minized(c); set_minimized(c);
client_set_minimized(c, true); client_set_minimized(c, true);
} else { } else {
client_set_minimized(c, false); client_set_minimized(c, false);