mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-16 22:05:25 -05:00
opt: optimize xwayland focus ignore judge
This commit is contained in:
parent
a90027e16b
commit
38bc6b2ffc
5 changed files with 34 additions and 17 deletions
|
|
@ -404,7 +404,22 @@ static inline void client_set_suspended(Client *c, int suspended) {
|
|||
wlr_xdg_toplevel_set_suspended(c->surface.xdg->toplevel, suspended);
|
||||
}
|
||||
|
||||
static inline int client_should_ignore_focus(Client *c) {
|
||||
static inline int client_should_ignore_focus_always(Client *c) {
|
||||
|
||||
#ifdef XWAYLAND
|
||||
if (client_is_x11(c)) {
|
||||
struct wlr_xwayland_surface *surface = c->surface.xwayland;
|
||||
|
||||
if (!surface->hints)
|
||||
return 0;
|
||||
|
||||
return !surface->hints->input;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int client_should_ignore_focus_open(Client *c) {
|
||||
|
||||
#ifdef XWAYLAND
|
||||
if (client_is_x11(c)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue