Compare commits
39 Commits
0dfd7966b4
...
19151d5643
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19151d5643 | ||
|
|
ffa496fa98 | ||
|
|
2f9cabe4b2 | ||
|
|
e2ee985b8f | ||
|
|
4280f8e0bf | ||
|
|
c004f7460c | ||
|
|
03ee277ef6 | ||
|
|
a0824c05df | ||
|
|
e7cb4f77f3 | ||
|
|
e22cf99e74 | ||
|
|
8e4d3b7aac | ||
|
|
58d5938e14 | ||
|
|
4fda32bf1f | ||
|
|
d941e0078e | ||
|
|
9c8f9e3b38 | ||
|
|
cdcc64ab5f | ||
|
|
ecab47fe92 | ||
|
|
fce47b37d9 | ||
|
|
f2b9835243 | ||
|
|
407c9d74a4 | ||
|
|
8875156760 | ||
|
|
514c916678 | ||
|
|
f542d5d5e6 | ||
|
|
d85f4375c8 | ||
|
|
33a0fe2485 | ||
|
|
16296898ce | ||
|
|
5ba7da0570 | ||
|
|
17f1ae2463 | ||
|
|
64dc30dc31 | ||
|
|
0501719604 | ||
|
|
6010cea805 | ||
|
|
e09748764d | ||
|
|
5774df00e0 | ||
|
|
d32fecfd23 | ||
|
|
18ad32384b | ||
|
|
9d6436cf42 | ||
|
|
08097b0991 | ||
|
|
e0bc7fb5e4 | ||
|
|
1029936b18 |
@@ -106,7 +106,7 @@ cd wlroots
|
|||||||
meson build -Dprefix=/usr
|
meson build -Dprefix=/usr
|
||||||
sudo ninja -C build install
|
sudo ninja -C build install
|
||||||
|
|
||||||
git clone https://github.com/wlrfx/scenefx.git
|
git clone -b 0.4.1 https://github.com/wlrfx/scenefx.git
|
||||||
cd scenefx
|
cd scenefx
|
||||||
meson build -Dprefix=/usr
|
meson build -Dprefix=/usr
|
||||||
sudo ninja -C build install
|
sudo ninja -C build install
|
||||||
@@ -189,7 +189,10 @@ Here's an example of using the modules in a flake:
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
mango.url = "github:DreamMaoMao/mango";
|
mango = {
|
||||||
|
url = "github:DreamMaoMao/mango";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
outputs =
|
outputs =
|
||||||
inputs@{ self, flake-parts, ... }:
|
inputs@{ self, flake-parts, ... }:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
project('mango', ['c', 'cpp'],
|
project('mango', ['c', 'cpp'],
|
||||||
version : '0.10.5',
|
version : '0.10.6',
|
||||||
)
|
)
|
||||||
|
|
||||||
subdir('protocols')
|
subdir('protocols')
|
||||||
|
|||||||
@@ -26,6 +26,25 @@ in {
|
|||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
mango = {
|
||||||
|
default = [
|
||||||
|
"gtk"
|
||||||
|
];
|
||||||
|
# except those
|
||||||
|
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
|
||||||
|
"org.freedesktop.impl.portal.ScreenCast" = ["wlr"];
|
||||||
|
"org.freedesktop.impl.portal.ScreenShot" = ["wlr"];
|
||||||
|
|
||||||
|
# wlr does not have this interface
|
||||||
|
"org.freedesktop.impl.portal.Inhibit" = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraPortals = with pkgs; [
|
||||||
|
xdg-desktop-portal-wlr
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
|
||||||
wlr.enable = lib.mkDefault true;
|
wlr.enable = lib.mkDefault true;
|
||||||
|
|
||||||
configPackages = [cfg.package];
|
configPackages = [cfg.package];
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ struct ivec2 clip_to_hide(Client *c, struct wlr_box *clip_box) {
|
|||||||
int offsetx = 0, offsety = 0, offsetw = 0, offseth = 0;
|
int offsetx = 0, offsety = 0, offsetw = 0, offseth = 0;
|
||||||
struct ivec2 offset = {0, 0, 0, 0};
|
struct ivec2 offset = {0, 0, 0, 0};
|
||||||
|
|
||||||
if (!ISTILED(c) && !c->animation.tagining && !c->animation.tagouted &&
|
if (!ISSCROLLTILED(c) && !c->animation.tagining && !c->animation.tagouted &&
|
||||||
!c->animation.tagouting)
|
!c->animation.tagouting)
|
||||||
return offset;
|
return offset;
|
||||||
|
|
||||||
@@ -484,7 +484,7 @@ struct ivec2 clip_to_hide(Client *c, struct wlr_box *clip_box) {
|
|||||||
需要主要border超出屏幕的时候不计算如偏差之内而是
|
需要主要border超出屏幕的时候不计算如偏差之内而是
|
||||||
要等窗口表面超出才开始计算偏差
|
要等窗口表面超出才开始计算偏差
|
||||||
*/
|
*/
|
||||||
if (ISTILED(c) || c->animation.tagining || c->animation.tagouted ||
|
if (ISSCROLLTILED(c) || c->animation.tagining || c->animation.tagouted ||
|
||||||
c->animation.tagouting) {
|
c->animation.tagouting) {
|
||||||
if (left_out_offset > 0) {
|
if (left_out_offset > 0) {
|
||||||
offsetx = GEZERO(left_out_offset - bw);
|
offsetx = GEZERO(left_out_offset - bw);
|
||||||
@@ -512,7 +512,7 @@ struct ivec2 clip_to_hide(Client *c, struct wlr_box *clip_box) {
|
|||||||
offset.height = offseth;
|
offset.height = offseth;
|
||||||
|
|
||||||
if ((clip_box->width + bw <= 0 || clip_box->height + bw <= 0) &&
|
if ((clip_box->width + bw <= 0 || clip_box->height + bw <= 0) &&
|
||||||
(ISTILED(c) || c->animation.tagouting || c->animation.tagining)) {
|
(ISSCROLLTILED(c) || c->animation.tagouting || c->animation.tagining)) {
|
||||||
c->is_clip_to_hide = true;
|
c->is_clip_to_hide = true;
|
||||||
wlr_scene_node_set_enabled(&c->scene->node, false);
|
wlr_scene_node_set_enabled(&c->scene->node, false);
|
||||||
} else if (c->is_clip_to_hide && VISIBLEON(c, c->mon)) {
|
} else if (c->is_clip_to_hide && VISIBLEON(c, c->mon)) {
|
||||||
|
|||||||
@@ -2282,35 +2282,53 @@ void parse_config_line(Config *config, const char *line) {
|
|||||||
|
|
||||||
void parse_config_file(Config *config, const char *file_path) {
|
void parse_config_file(Config *config, const char *file_path) {
|
||||||
FILE *file;
|
FILE *file;
|
||||||
// 检查路径是否以 ~/ 开头
|
char full_path[1024];
|
||||||
if (file_path[0] == '~' && (file_path[1] == '/' || file_path[1] == '\0')) {
|
|
||||||
|
if (file_path[0] == '.' && file_path[1] == '/') {
|
||||||
|
// Relative path
|
||||||
|
|
||||||
|
const char *mangoconfig = getenv("MANGOCONFIG");
|
||||||
|
if (mangoconfig && mangoconfig[0] != '\0') {
|
||||||
|
snprintf(full_path, sizeof(full_path), "%s/%s", mangoconfig,
|
||||||
|
file_path + 1);
|
||||||
|
} else {
|
||||||
|
const char *home = getenv("HOME");
|
||||||
|
if (!home) {
|
||||||
|
fprintf(stderr, "Error: HOME environment variable not set.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
snprintf(full_path, sizeof(full_path), "%s/.config/mango/%s", home,
|
||||||
|
file_path + 1);
|
||||||
|
}
|
||||||
|
file = fopen(full_path, "r");
|
||||||
|
|
||||||
|
} else if (file_path[0] == '~' &&
|
||||||
|
(file_path[1] == '/' || file_path[1] == '\0')) {
|
||||||
|
// Home directory
|
||||||
|
|
||||||
const char *home = getenv("HOME");
|
const char *home = getenv("HOME");
|
||||||
if (!home) {
|
if (!home) {
|
||||||
fprintf(stderr, "Error: HOME environment variable not set.\n");
|
fprintf(stderr, "Error: HOME environment variable not set.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 构建完整路径(家目录 + / + 原路径去掉 ~)
|
|
||||||
char full_path[1024];
|
|
||||||
snprintf(full_path, sizeof(full_path), "%s%s", home, file_path + 1);
|
snprintf(full_path, sizeof(full_path), "%s%s", home, file_path + 1);
|
||||||
|
|
||||||
file = fopen(full_path, "r");
|
file = fopen(full_path, "r");
|
||||||
if (!file) {
|
|
||||||
perror("Error opening file");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
|
// Absolute path
|
||||||
file = fopen(file_path, "r");
|
file = fopen(file_path, "r");
|
||||||
if (!file) {
|
}
|
||||||
perror("Error opening file");
|
|
||||||
return;
|
if (!file) {
|
||||||
}
|
perror("Error opening file");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
char line[512];
|
char line[512];
|
||||||
while (fgets(line, sizeof(line), file)) {
|
while (fgets(line, sizeof(line), file)) {
|
||||||
if (line[0] == '#' || line[0] == '\n')
|
if (line[0] == '#' || line[0] == '\n') {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
parse_config_line(config, line);
|
parse_config_line(config, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3121,6 +3139,12 @@ void reapply_monitor_rules(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void reapply_cursor_style(void) {
|
||||||
|
if (cursor_mgr)
|
||||||
|
wlr_xcursor_manager_destroy(cursor_mgr);
|
||||||
|
cursor_mgr = wlr_xcursor_manager_create(config.cursor_theme, cursor_size);
|
||||||
|
}
|
||||||
|
|
||||||
void reapply_border(void) {
|
void reapply_border(void) {
|
||||||
Client *c = NULL;
|
Client *c = NULL;
|
||||||
|
|
||||||
@@ -3222,6 +3246,7 @@ void reset_option(void) {
|
|||||||
set_env();
|
set_env();
|
||||||
run_exec();
|
run_exec();
|
||||||
|
|
||||||
|
reapply_cursor_style();
|
||||||
reapply_border();
|
reapply_border();
|
||||||
reapply_keyboard();
|
reapply_keyboard();
|
||||||
reapply_pointer();
|
reapply_pointer();
|
||||||
|
|||||||
@@ -80,8 +80,12 @@ int defaultgaps(const Arg *arg) {
|
|||||||
|
|
||||||
int exchange_client(const Arg *arg) {
|
int exchange_client(const Arg *arg) {
|
||||||
Client *c = selmon->sel;
|
Client *c = selmon->sel;
|
||||||
if (!c || c->isfloating || c->isfullscreen || c->ismaximizescreen)
|
if (!c || c->isfloating)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if ((c->isfullscreen || c->ismaximizescreen) && !is_scroller_layout(c->mon))
|
||||||
|
return 0;
|
||||||
|
|
||||||
exchange_two_client(c, direction_select(arg));
|
exchange_two_client(c, direction_select(arg));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -535,7 +539,7 @@ int setlayout(const Arg *arg) {
|
|||||||
for (jk = 0; jk < LENGTH(layouts); jk++) {
|
for (jk = 0; jk < LENGTH(layouts); jk++) {
|
||||||
if (strcmp(layouts[jk].name, arg->v) == 0) {
|
if (strcmp(layouts[jk].name, arg->v) == 0) {
|
||||||
selmon->pertag->ltidxs[selmon->pertag->curtag] = &layouts[jk];
|
selmon->pertag->ltidxs[selmon->pertag->curtag] = &layouts[jk];
|
||||||
|
clear_fullscreen_and_maximized_state(selmon);
|
||||||
arrange(selmon, false);
|
arrange(selmon, false);
|
||||||
printstatus();
|
printstatus();
|
||||||
return 0;
|
return 0;
|
||||||
@@ -939,7 +943,7 @@ int switch_layout(const Arg *arg) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
clear_fullscreen_and_maximized_state(selmon);
|
||||||
arrange(selmon, false);
|
arrange(selmon, false);
|
||||||
printstatus();
|
printstatus();
|
||||||
return 0;
|
return 0;
|
||||||
@@ -950,6 +954,7 @@ int switch_layout(const Arg *arg) {
|
|||||||
selmon->pertag->ltidxs[selmon->pertag->curtag]->name) == 0) {
|
selmon->pertag->ltidxs[selmon->pertag->curtag]->name) == 0) {
|
||||||
selmon->pertag->ltidxs[selmon->pertag->curtag] =
|
selmon->pertag->ltidxs[selmon->pertag->curtag] =
|
||||||
jk == LENGTH(layouts) - 1 ? &layouts[0] : &layouts[jk + 1];
|
jk == LENGTH(layouts) - 1 ? &layouts[0] : &layouts[jk + 1];
|
||||||
|
clear_fullscreen_and_maximized_state(selmon);
|
||||||
arrange(selmon, false);
|
arrange(selmon, false);
|
||||||
printstatus();
|
printstatus();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -258,6 +258,7 @@ void dwl_ipc_output_set_layout(struct wl_client *client,
|
|||||||
index = 0;
|
index = 0;
|
||||||
|
|
||||||
monitor->pertag->ltidxs[monitor->pertag->curtag] = &layouts[index];
|
monitor->pertag->ltidxs[monitor->pertag->curtag] = &layouts[index];
|
||||||
|
clear_fullscreen_and_maximized_state(monitor);
|
||||||
arrange(monitor, false);
|
arrange(monitor, false);
|
||||||
printstatus();
|
printstatus();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -327,11 +327,12 @@ Client *direction_select(const Arg *arg) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (tc && (tc->isfullscreen || tc->ismaximizescreen) &&
|
if (tc && (tc->isfullscreen || tc->ismaximizescreen) &&
|
||||||
!is_scroller_layout(selmon)) {
|
(!is_scroller_layout(selmon) || tc->isfloating)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return find_client_by_direction(tc, arg, true, is_scroller_layout(selmon));
|
return find_client_by_direction(
|
||||||
|
tc, arg, true, is_scroller_layout(selmon) && !selmon->isoverview);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We probably should change the name of this, it sounds like
|
/* We probably should change the name of this, it sounds like
|
||||||
|
|||||||
@@ -115,6 +115,10 @@ void xytonode(double x, double y, struct wlr_surface **psurface, Client **pc,
|
|||||||
surface = wlr_scene_surface_try_from_buffer(
|
surface = wlr_scene_surface_try_from_buffer(
|
||||||
wlr_scene_buffer_from_node(node))
|
wlr_scene_buffer_from_node(node))
|
||||||
->surface;
|
->surface;
|
||||||
|
else if (node->type == WLR_SCENE_NODE_RECT) {
|
||||||
|
surface = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* start from the topmost layer,
|
/* start from the topmost layer,
|
||||||
find a sureface that can be focused by pointer,
|
find a sureface that can be focused by pointer,
|
||||||
|
|||||||
@@ -301,8 +301,7 @@ void scroller(Monitor *m) {
|
|||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
c = tempClients[i];
|
c = tempClients[i];
|
||||||
if (root_client == c) {
|
if (root_client == c) {
|
||||||
if (!c->is_pending_open_animation &&
|
if (c->geom.x >= m->w.x + scroller_structs &&
|
||||||
c->geom.x >= m->w.x + scroller_structs &&
|
|
||||||
c->geom.x + c->geom.width <=
|
c->geom.x + c->geom.width <=
|
||||||
m->w.x + m->w.width - scroller_structs) {
|
m->w.x + m->w.width - scroller_structs) {
|
||||||
need_scroller = false;
|
need_scroller = false;
|
||||||
|
|||||||
@@ -263,8 +263,7 @@ void vertical_scroller(Monitor *m) {
|
|||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
c = tempClients[i];
|
c = tempClients[i];
|
||||||
if (root_client == c) {
|
if (root_client == c) {
|
||||||
if (!c->is_pending_open_animation &&
|
if (c->geom.y >= m->w.y + scroller_structs &&
|
||||||
c->geom.y >= m->w.y + scroller_structs &&
|
|
||||||
c->geom.y + c->geom.height <=
|
c->geom.y + c->geom.height <=
|
||||||
m->w.y + m->w.height - scroller_structs) {
|
m->w.y + m->w.height - scroller_structs) {
|
||||||
need_scroller = false;
|
need_scroller = false;
|
||||||
|
|||||||
43
src/mango.c
43
src/mango.c
@@ -741,6 +741,7 @@ static void refresh_monitors_workspaces_status(Monitor *m);
|
|||||||
static void init_client_properties(Client *c);
|
static void init_client_properties(Client *c);
|
||||||
static float *get_border_color(Client *c);
|
static float *get_border_color(Client *c);
|
||||||
static void request_fresh_all_monitors(void);
|
static void request_fresh_all_monitors(void);
|
||||||
|
static void clear_fullscreen_and_maximized_state(Monitor *m);
|
||||||
|
|
||||||
#include "data/static_keymap.h"
|
#include "data/static_keymap.h"
|
||||||
#include "dispatch/bind_declare.h"
|
#include "dispatch/bind_declare.h"
|
||||||
@@ -938,11 +939,25 @@ void applybounds(Client *c, struct wlr_box *bbox) {
|
|||||||
c->geom.y = bbox->y;
|
c->geom.y = bbox->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clear_fullscreen_and_maximized_state(Monitor *m) {
|
||||||
|
Client *fc = NULL;
|
||||||
|
wl_list_for_each(fc, &clients, link) {
|
||||||
|
if (fc && VISIBLEON(fc, m) && ISFULLSCREEN(fc)) {
|
||||||
|
clear_fullscreen_flag(fc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*清除全屏标志,还原全屏时清0的border*/
|
/*清除全屏标志,还原全屏时清0的border*/
|
||||||
void clear_fullscreen_flag(Client *c) {
|
void clear_fullscreen_flag(Client *c) {
|
||||||
|
|
||||||
if (is_scroller_layout(c->mon))
|
if ((c->mon->pertag->ltidxs[get_tags_first_tag_num(c->tags)]->id ==
|
||||||
|
SCROLLER ||
|
||||||
|
c->mon->pertag->ltidxs[get_tags_first_tag_num(c->tags)]->id ==
|
||||||
|
VERTICAL_SCROLLER) &&
|
||||||
|
!c->isfloating) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (c->isfullscreen) {
|
if (c->isfullscreen) {
|
||||||
setfullscreen(c, false);
|
setfullscreen(c, false);
|
||||||
@@ -2207,6 +2222,15 @@ void maplayersurfacenotify(struct wl_listener *listener, void *data) {
|
|||||||
}
|
}
|
||||||
// 刷新布局,让窗口能感应到exclude_zone变化以及设置独占表面
|
// 刷新布局,让窗口能感应到exclude_zone变化以及设置独占表面
|
||||||
arrangelayers(l->mon);
|
arrangelayers(l->mon);
|
||||||
|
|
||||||
|
// 按需交互layer需要像正常窗口一样抢占非独占layer的焦点
|
||||||
|
if (!exclusive_focus &&
|
||||||
|
l->layer_surface->current.keyboard_interactive ==
|
||||||
|
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) {
|
||||||
|
focusclient(NULL, 0);
|
||||||
|
client_notify_enter(l->layer_surface->surface,
|
||||||
|
wlr_seat_get_keyboard(seat));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void commitlayersurfacenotify(struct wl_listener *listener, void *data) {
|
void commitlayersurfacenotify(struct wl_listener *listener, void *data) {
|
||||||
@@ -3726,7 +3750,7 @@ mapnotify(struct wl_listener *listener, void *data) {
|
|||||||
// tile at the top
|
// tile at the top
|
||||||
wl_list_insert(&clients, &c->link); // 新窗口是master,头部入栈
|
wl_list_insert(&clients, &c->link); // 新窗口是master,头部入栈
|
||||||
else if (selmon && is_scroller_layout(selmon) &&
|
else if (selmon && is_scroller_layout(selmon) &&
|
||||||
selmon->visible_tiling_clients > 0) {
|
selmon->visible_scroll_tiling_clients > 0) {
|
||||||
|
|
||||||
if (selmon->sel && ISSCROLLTILED(selmon->sel) &&
|
if (selmon->sel && ISSCROLLTILED(selmon->sel) &&
|
||||||
VISIBLEON(selmon->sel, selmon)) {
|
VISIBLEON(selmon->sel, selmon)) {
|
||||||
@@ -4565,7 +4589,7 @@ void setmaximizescreen(Client *c, int maximizescreen) {
|
|||||||
maximizescreen_box.width = c->mon->w.width - 2 * gappoh;
|
maximizescreen_box.width = c->mon->w.width - 2 * gappoh;
|
||||||
maximizescreen_box.height = c->mon->w.height - 2 * gappov;
|
maximizescreen_box.height = c->mon->w.height - 2 * gappov;
|
||||||
wlr_scene_node_raise_to_top(&c->scene->node); // 将视图提升到顶层
|
wlr_scene_node_raise_to_top(&c->scene->node); // 将视图提升到顶层
|
||||||
if (!is_scroller_layout(c->mon))
|
if (!is_scroller_layout(c->mon) || c->isfloating)
|
||||||
resize(c, maximizescreen_box, 0);
|
resize(c, maximizescreen_box, 0);
|
||||||
c->ismaximizescreen = 1;
|
c->ismaximizescreen = 1;
|
||||||
} else {
|
} else {
|
||||||
@@ -4575,9 +4599,8 @@ void setmaximizescreen(Client *c, int maximizescreen) {
|
|||||||
setfloating(c, 1);
|
setfloating(c, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_scene_node_reparent(&c->scene->node, layers[maximizescreen ? LyrTile
|
wlr_scene_node_reparent(&c->scene->node,
|
||||||
: c->isfloating ? LyrTop
|
layers[c->isfloating ? LyrTop : LyrTile]);
|
||||||
: LyrTile]);
|
|
||||||
if (!c->ismaximizescreen) {
|
if (!c->ismaximizescreen) {
|
||||||
set_size_per(c->mon, c);
|
set_size_per(c->mon, c);
|
||||||
}
|
}
|
||||||
@@ -4623,7 +4646,7 @@ void setfullscreen(Client *c, int fullscreen) // 用自定义全屏代理自带
|
|||||||
|
|
||||||
c->bw = 0;
|
c->bw = 0;
|
||||||
wlr_scene_node_raise_to_top(&c->scene->node); // 将视图提升到顶层
|
wlr_scene_node_raise_to_top(&c->scene->node); // 将视图提升到顶层
|
||||||
if (!is_scroller_layout(c->mon))
|
if (!is_scroller_layout(c->mon) || c->isfloating)
|
||||||
resize(c, c->mon->m, 1);
|
resize(c, c->mon->m, 1);
|
||||||
c->isfullscreen = 1;
|
c->isfullscreen = 1;
|
||||||
} else {
|
} else {
|
||||||
@@ -5199,7 +5222,11 @@ unsigned int want_restore_fullscreen(Client *target_client) {
|
|||||||
Client *c = NULL;
|
Client *c = NULL;
|
||||||
wl_list_for_each(c, &clients, link) {
|
wl_list_for_each(c, &clients, link) {
|
||||||
if (c && c != target_client && c->tags == target_client->tags &&
|
if (c && c != target_client && c->tags == target_client->tags &&
|
||||||
c == selmon->sel) {
|
c == selmon->sel &&
|
||||||
|
c->mon->pertag->ltidxs[get_tags_first_tag_num(c->tags)]->id !=
|
||||||
|
SCROLLER &&
|
||||||
|
c->mon->pertag->ltidxs[get_tags_first_tag_num(c->tags)]->id !=
|
||||||
|
VERTICAL_SCROLLER) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user