mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-29 21:37:42 -04:00
fix: should ignore empty input layer focus
This commit is contained in:
parent
c23f91c16a
commit
46d0d139a5
4 changed files with 14 additions and 1 deletions
|
|
@ -273,6 +273,7 @@ If your distribution isn't listed above, or you want the latest unreleased chang
|
||||||
> - `hwdata`
|
> - `hwdata`
|
||||||
> - `seatd`
|
> - `seatd`
|
||||||
> - `pcre2`
|
> - `pcre2`
|
||||||
|
> - `pixman`
|
||||||
> - `xorg-xwayland`
|
> - `xorg-xwayland`
|
||||||
> - `libxcb`
|
> - `libxcb`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@
|
||||||
seatd
|
seatd
|
||||||
pcre2
|
pcre2
|
||||||
libxcb
|
libxcb
|
||||||
|
pixman
|
||||||
xcb-util-wm
|
xcb-util-wm
|
||||||
wlroots-0.19
|
wlroots-0.19
|
||||||
scenefx))
|
scenefx))
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ xkbcommon_dep = dependency('xkbcommon')
|
||||||
libinput_dep = dependency('libinput',version: '>=1.27.1')
|
libinput_dep = dependency('libinput',version: '>=1.27.1')
|
||||||
libwayland_client_dep = dependency('wayland-client')
|
libwayland_client_dep = dependency('wayland-client')
|
||||||
pcre2_dep = dependency('libpcre2-8')
|
pcre2_dep = dependency('libpcre2-8')
|
||||||
|
pixman_dep = dependency('pixman-1')
|
||||||
|
|
||||||
|
|
||||||
# 获取版本信息
|
# 获取版本信息
|
||||||
|
|
@ -107,6 +108,7 @@ executable('mango',
|
||||||
libinput_dep,
|
libinput_dep,
|
||||||
libwayland_client_dep,
|
libwayland_client_dep,
|
||||||
pcre2_dep,
|
pcre2_dep,
|
||||||
|
pixman_dep,
|
||||||
],
|
],
|
||||||
install : true,
|
install : true,
|
||||||
c_args : c_args,
|
c_args : c_args,
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,15 @@ Client *xytoclient(double x, double y) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool layer_ignores_focus(LayerSurface *l) {
|
||||||
|
if (!l || !l->layer_surface)
|
||||||
|
return true;
|
||||||
|
struct wlr_surface *s = l->layer_surface->surface;
|
||||||
|
return !pixman_region32_not_empty(&s->input_region) ||
|
||||||
|
l->layer_surface->current.keyboard_interactive ==
|
||||||
|
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
void xytonode(double x, double y, struct wlr_surface **psurface, Client **pc,
|
void xytonode(double x, double y, struct wlr_surface **psurface, Client **pc,
|
||||||
LayerSurface **pl, double *nx, double *ny) {
|
LayerSurface **pl, double *nx, double *ny) {
|
||||||
struct wlr_scene_node *node, *pnode;
|
struct wlr_scene_node *node, *pnode;
|
||||||
|
|
@ -151,7 +160,7 @@ void xytonode(double x, double y, struct wlr_surface **psurface, Client **pc,
|
||||||
if (pl)
|
if (pl)
|
||||||
*pl = l;
|
*pl = l;
|
||||||
|
|
||||||
if (selmon && selmon->isoverview && !l) {
|
if (selmon && selmon->isoverview && (!l || layer_ignores_focus(l))) {
|
||||||
ovc = xytoclient(x, y);
|
ovc = xytoclient(x, y);
|
||||||
if (pc)
|
if (pc)
|
||||||
*pc = ovc;
|
*pc = ovc;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue