mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-28 21:37:28 -04:00
opt: focusid allow cross tag
This commit is contained in:
parent
431b1c1282
commit
e29cec64e4
3 changed files with 29 additions and 19 deletions
|
|
@ -60,4 +60,30 @@ void client_tile_resize(Client *c, struct wlr_box geo, int32_t interact) {
|
|||
}
|
||||
|
||||
static uint32_t next_client_id = 0;
|
||||
uint32_t generate_client_id(void) { return ++next_client_id; }
|
||||
uint32_t generate_client_id(void) { return ++next_client_id; }
|
||||
|
||||
void client_active(Client *c) {
|
||||
uint32_t target;
|
||||
|
||||
if (client_is_unmanaged(c)) {
|
||||
focusclient(c, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (c->swallowing || !c->mon)
|
||||
return;
|
||||
|
||||
if (c->isminimized) {
|
||||
c->is_in_scratchpad = 0;
|
||||
c->isnamedscratchpad = 0;
|
||||
c->is_scratchpad_show = 0;
|
||||
setborder_color(c);
|
||||
show_hide_client(c);
|
||||
arrange(c->mon, true, false);
|
||||
return;
|
||||
}
|
||||
|
||||
target = get_tags_first_tag(c->tags);
|
||||
view_in_mon(&(Arg){.ui = target}, true, c->mon, true);
|
||||
focusclient(c, 1);
|
||||
}
|
||||
|
|
@ -2001,6 +2001,6 @@ int32_t focusid(const Arg *arg) {
|
|||
return 0;
|
||||
|
||||
Client *c = arg->tc;
|
||||
focusclient(c, 1);
|
||||
client_active(c);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -4,24 +4,8 @@ static struct wlr_foreign_toplevel_manager_v1 *foreign_toplevel_manager;
|
|||
|
||||
void handle_foreign_activate_request(struct wl_listener *listener, void *data) {
|
||||
Client *c = wl_container_of(listener, c, foreign_activate_request);
|
||||
uint32_t target;
|
||||
|
||||
if (c->swallowing || !c->mon)
|
||||
return;
|
||||
|
||||
if (c->isminimized) {
|
||||
c->is_in_scratchpad = 0;
|
||||
c->isnamedscratchpad = 0;
|
||||
c->is_scratchpad_show = 0;
|
||||
setborder_color(c);
|
||||
show_hide_client(c);
|
||||
arrange(c->mon, true, false);
|
||||
return;
|
||||
}
|
||||
|
||||
target = get_tags_first_tag(c->tags);
|
||||
view_in_mon(&(Arg){.ui = target}, true, c->mon, true);
|
||||
focusclient(c, 1);
|
||||
client_active(c);
|
||||
}
|
||||
|
||||
void handle_foreign_maximize_request(struct wl_listener *listener, void *data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue