mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
opt: set minimized state to xsurface
This commit is contained in:
parent
03c4d645e5
commit
c02add7553
2 changed files with 13 additions and 0 deletions
|
|
@ -328,6 +328,17 @@ static inline uint32_t client_set_size(Client *c, uint32_t width,
|
|||
(int32_t)height);
|
||||
}
|
||||
|
||||
static inline void client_set_minimized(Client *c, bool minimized) {
|
||||
#ifdef XWAYLAND
|
||||
if (client_is_x11(c)) {
|
||||
wlr_xwayland_surface_set_minimized(c->surface.xwayland, minimized);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void client_set_tiled(Client *c, uint32_t edges) {
|
||||
struct wlr_xdg_toplevel *toplevel;
|
||||
#ifdef XWAYLAND
|
||||
|
|
|
|||
|
|
@ -3448,6 +3448,7 @@ void set_minized(Client *c) {
|
|||
wlr_foreign_toplevel_handle_v1_set_minimized(c->foreign_toplevel, true);
|
||||
wl_list_remove(&c->link); // 从原来位置移除
|
||||
wl_list_insert(clients.prev, &c->link); // 插入尾部
|
||||
client_set_minimized(c, true);
|
||||
}
|
||||
|
||||
void // 0.5 custom
|
||||
|
|
@ -4337,6 +4338,7 @@ void show_hide_client(Client *c) {
|
|||
tag_client(&(Arg){.ui = target}, c);
|
||||
// c->tags = c->oldtags;
|
||||
c->isminied = 0;
|
||||
client_set_minimized(c, false);
|
||||
wlr_foreign_toplevel_handle_v1_set_minimized(c->foreign_toplevel, false);
|
||||
focusclient(c, 1);
|
||||
wlr_foreign_toplevel_handle_v1_set_activated(c->foreign_toplevel, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue