Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ border_radius=6
no_radius_when_single=0
focused_opacity=1.0
unfocused_opacity=1.0
allow_fullscreen_opacity=0

# Animation Configuration(support type:zoom,slide)
# tag_animation_direction: 1-horizontal,0-vertical
Expand Down
3 changes: 2 additions & 1 deletion src/animation/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,8 @@ bool client_apply_focus_opacity(Client *c) {
float *border_color = get_border_color(c);
if (c->isfullscreen) {
c->opacity_animation.running = false;
client_set_opacity(c, 1);
client_set_opacity(
c, config.allow_fullscreen_opacity ? opacity : 1.0f);
} else if (c->animation.running && c->animation.action == OPEN) {
c->opacity_animation.running = false;
struct timespec now;
Expand Down
6 changes: 6 additions & 0 deletions src/config/parse_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ typedef struct {
int32_t allow_shortcuts_inhibit;
int32_t allow_lock_transparent;

int32_t allow_fullscreen_opacity;

struct xkb_rule_names xkb_rules;

char keymode[28];
Expand Down Expand Up @@ -1281,6 +1283,8 @@ void parse_option(Config *config, char *key, char *value) {
config->allow_shortcuts_inhibit = atoi(value);
} else if (strcmp(key, "allow_lock_transparent") == 0) {
config->allow_lock_transparent = atoi(value);
} else if (strcmp(key, "allow_fullscreen_opacity") == 0) {
config->allow_fullscreen_opacity = atoi(value);
} else if (strcmp(key, "no_border_when_single") == 0) {
config->no_border_when_single = atoi(value);
} else if (strcmp(key, "no_radius_when_single") == 0) {
Expand Down Expand Up @@ -2747,6 +2751,7 @@ void override_config(void) {
allow_tearing = CLAMP_INT(config.allow_tearing, 0, 2);
allow_shortcuts_inhibit = CLAMP_INT(config.allow_shortcuts_inhibit, 0, 1);
allow_lock_transparent = CLAMP_INT(config.allow_lock_transparent, 0, 1);
allow_fullscreen_opacity = CLAMP_INT(config.allow_fullscreen_opacity, 0, 1);
axis_bind_apply_timeout =
CLAMP_INT(config.axis_bind_apply_timeout, 0, 1000);
focus_on_activate = CLAMP_INT(config.focus_on_activate, 0, 1);
Expand Down Expand Up @@ -2932,6 +2937,7 @@ void set_value_default() {
config.allow_tearing = allow_tearing;
config.allow_shortcuts_inhibit = allow_shortcuts_inhibit;
config.allow_lock_transparent = allow_lock_transparent;
config.allow_fullscreen_opacity = allow_fullscreen_opacity;
config.no_border_when_single = no_border_when_single;
config.no_radius_when_single = no_radius_when_single;
config.snap_distance = snap_distance;
Expand Down
3 changes: 3 additions & 0 deletions src/config/preset.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ int32_t xwayland_persistence = 1; /* xwayland persistence */
int32_t syncobj_enable = 0;
int32_t adaptive_sync = 0;
int32_t allow_lock_transparent = 0;

int32_t allow_fullscreen_opacity = 0;

double drag_refresh_interval = 16.0;
int32_t allow_tearing = TEARING_DISABLED;
int32_t allow_shortcuts_inhibit = SHORTCUTS_INHIBIT_ENABLE;
Expand Down
2 changes: 1 addition & 1 deletion src/mango.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,11 +936,11 @@ static struct wl_listener xwayland_ready = {.notify = xwaylandready};
static struct wlr_xwayland *xwayland;
#endif

#include "config/parse_config.h"
#include "animation/client.h"
#include "animation/common.h"
#include "animation/layer.h"
#include "animation/tag.h"
#include "config/parse_config.h"
#include "dispatch/bind_define.h"
#include "ext-protocol/all.h"
#include "fetch/fetch.h"
Expand Down