mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
feat: add option view_current_to_back
This commit is contained in:
parent
3679e7faba
commit
531eae54cf
3 changed files with 7 additions and 3 deletions
|
|
@ -174,6 +174,7 @@ typedef struct {
|
||||||
int edge_scroller_pointer_focus;
|
int edge_scroller_pointer_focus;
|
||||||
int focus_cross_monitor;
|
int focus_cross_monitor;
|
||||||
int focus_cross_tag;
|
int focus_cross_tag;
|
||||||
|
int view_current_to_back;
|
||||||
int no_border_when_single;
|
int no_border_when_single;
|
||||||
int no_radius_when_single;
|
int no_radius_when_single;
|
||||||
int snap_distance;
|
int snap_distance;
|
||||||
|
|
@ -969,8 +970,8 @@ void parse_config_line(Config *config, const char *line) {
|
||||||
config->focus_cross_monitor = atoi(value);
|
config->focus_cross_monitor = atoi(value);
|
||||||
} else if (strcmp(key, "focus_cross_tag") == 0) {
|
} else if (strcmp(key, "focus_cross_tag") == 0) {
|
||||||
config->focus_cross_tag = atoi(value);
|
config->focus_cross_tag = atoi(value);
|
||||||
} else if (strcmp(key, "focus_cross_tag") == 0) {
|
} else if (strcmp(key, "view_current_to_back") == 0) {
|
||||||
config->focus_cross_tag = atoi(value);
|
config->view_current_to_back = atoi(value);
|
||||||
} else if (strcmp(key, "blur") == 0) {
|
} else if (strcmp(key, "blur") == 0) {
|
||||||
config->blur = atoi(value);
|
config->blur = atoi(value);
|
||||||
} else if (strcmp(key, "blur_layer") == 0) {
|
} else if (strcmp(key, "blur_layer") == 0) {
|
||||||
|
|
@ -2347,6 +2348,7 @@ void override_config(void) {
|
||||||
warpcursor = CLAMP_INT(config.warpcursor, 0, 1);
|
warpcursor = CLAMP_INT(config.warpcursor, 0, 1);
|
||||||
focus_cross_monitor = CLAMP_INT(config.focus_cross_monitor, 0, 1);
|
focus_cross_monitor = CLAMP_INT(config.focus_cross_monitor, 0, 1);
|
||||||
focus_cross_tag = CLAMP_INT(config.focus_cross_tag, 0, 1);
|
focus_cross_tag = CLAMP_INT(config.focus_cross_tag, 0, 1);
|
||||||
|
view_current_to_back = CLAMP_INT(config.view_current_to_back, 0, 1);
|
||||||
enable_floating_snap = CLAMP_INT(config.enable_floating_snap, 0, 1);
|
enable_floating_snap = CLAMP_INT(config.enable_floating_snap, 0, 1);
|
||||||
snap_distance = CLAMP_INT(config.snap_distance, 0, 99999);
|
snap_distance = CLAMP_INT(config.snap_distance, 0, 99999);
|
||||||
cursor_size = CLAMP_INT(config.cursor_size, 4, 512);
|
cursor_size = CLAMP_INT(config.cursor_size, 4, 512);
|
||||||
|
|
@ -2495,6 +2497,7 @@ void set_value_default() {
|
||||||
config.edge_scroller_pointer_focus = edge_scroller_pointer_focus;
|
config.edge_scroller_pointer_focus = edge_scroller_pointer_focus;
|
||||||
config.focus_cross_monitor = focus_cross_monitor;
|
config.focus_cross_monitor = focus_cross_monitor;
|
||||||
config.focus_cross_tag = focus_cross_tag;
|
config.focus_cross_tag = focus_cross_tag;
|
||||||
|
config.view_current_to_back = view_current_to_back;
|
||||||
config.single_scratchpad = single_scratchpad;
|
config.single_scratchpad = single_scratchpad;
|
||||||
config.xwayland_persistence = xwayland_persistence;
|
config.xwayland_persistence = xwayland_persistence;
|
||||||
config.syncobj_enable = syncobj_enable;
|
config.syncobj_enable = syncobj_enable;
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ int scroller_focus_center = 0;
|
||||||
int scroller_prefer_center = 0;
|
int scroller_prefer_center = 0;
|
||||||
int focus_cross_monitor = 0;
|
int focus_cross_monitor = 0;
|
||||||
int focus_cross_tag = 0;
|
int focus_cross_tag = 0;
|
||||||
|
int view_current_to_back = 1;
|
||||||
int no_border_when_single = 0;
|
int no_border_when_single = 0;
|
||||||
int no_radius_when_single = 0;
|
int no_radius_when_single = 0;
|
||||||
int snap_distance = 30;
|
int snap_distance = 30;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ void bind_to_view(const Arg *arg) {
|
||||||
|
|
||||||
unsigned int target = arg->ui;
|
unsigned int target = arg->ui;
|
||||||
|
|
||||||
if (selmon->pertag->curtag &&
|
if (view_current_to_back && selmon->pertag->curtag &&
|
||||||
(target & TAGMASK) == (selmon->tagset[selmon->seltags])) {
|
(target & TAGMASK) == (selmon->tagset[selmon->seltags])) {
|
||||||
if (selmon->pertag->prevtag)
|
if (selmon->pertag->prevtag)
|
||||||
target = 1 << (selmon->pertag->prevtag - 1);
|
target = 1 << (selmon->pertag->prevtag - 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue