mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-31 22:25:29 -04:00
opt: UTILITY type x11 window set to isunglobal window
This commit is contained in:
parent
38dccbe4b4
commit
e3dc46705d
1 changed files with 11 additions and 4 deletions
15
src/maomao.c
15
src/maomao.c
|
|
@ -3850,8 +3850,6 @@ static void iter_xdg_scene_buffers(struct wlr_scene_buffer *buffer, int sx,
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_client_properties(Client *c) {
|
void init_client_properties(Client *c) {
|
||||||
c->geom.width += 2 * c->bw;
|
|
||||||
c->geom.height += 2 * c->bw;
|
|
||||||
c->ismaxmizescreen = 0;
|
c->ismaxmizescreen = 0;
|
||||||
c->isfullscreen = 0;
|
c->isfullscreen = 0;
|
||||||
c->need_float_size_reduce = 0;
|
c->need_float_size_reduce = 0;
|
||||||
|
|
@ -3897,6 +3895,9 @@ mapnotify(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
client_get_geometry(c, &c->geom);
|
client_get_geometry(c, &c->geom);
|
||||||
|
|
||||||
|
init_client_properties(c);
|
||||||
|
|
||||||
|
// set special window properties
|
||||||
if (client_is_unmanaged(c) || client_should_ignore_focus(c)) {
|
if (client_is_unmanaged(c) || client_should_ignore_focus(c)) {
|
||||||
c->bw = 0;
|
c->bw = 0;
|
||||||
c->isnoborder = 1;
|
c->isnoborder = 1;
|
||||||
|
|
@ -3904,6 +3905,14 @@ mapnotify(struct wl_listener *listener, void *data) {
|
||||||
c->bw = borderpx;
|
c->bw = borderpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (client_should_overtop(c) && !client_get_parent(c)) {
|
||||||
|
c->isunglobal = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// init client geom
|
||||||
|
c->geom.width += 2 * c->bw;
|
||||||
|
c->geom.height += 2 * c->bw;
|
||||||
|
|
||||||
/* Handle unmanaged clients first so we can return prior create borders */
|
/* Handle unmanaged clients first so we can return prior create borders */
|
||||||
if (client_is_unmanaged(c)) {
|
if (client_is_unmanaged(c)) {
|
||||||
/* Unmanaged clients always are floating */
|
/* Unmanaged clients always are floating */
|
||||||
|
|
@ -3943,8 +3952,6 @@ mapnotify(struct wl_listener *listener, void *data) {
|
||||||
client_set_tiled(c, WLR_EDGE_TOP | WLR_EDGE_BOTTOM | WLR_EDGE_LEFT |
|
client_set_tiled(c, WLR_EDGE_TOP | WLR_EDGE_BOTTOM | WLR_EDGE_LEFT |
|
||||||
WLR_EDGE_RIGHT);
|
WLR_EDGE_RIGHT);
|
||||||
|
|
||||||
init_client_properties(c);
|
|
||||||
|
|
||||||
if (new_is_master && selmon && !is_scroller_layout(selmon))
|
if (new_is_master && selmon && !is_scroller_layout(selmon))
|
||||||
// tile at the top
|
// tile at the top
|
||||||
wl_list_insert(&clients, &c->link); // 新窗口是master,头部入栈
|
wl_list_insert(&clients, &c->link); // 新窗口是master,头部入栈
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue