mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-05 13:29:54 -05:00
opt: allow use cursor to select ime popup item
This commit is contained in:
parent
589d460ead
commit
8d6f571e73
1 changed files with 13 additions and 9 deletions
|
|
@ -110,10 +110,6 @@ void xytonode(double x, double y, struct wlr_surface **psurface, Client **pc,
|
||||||
|
|
||||||
for (layer = NUM_LAYERS - 1; !surface && layer >= 0; layer--) {
|
for (layer = NUM_LAYERS - 1; !surface && layer >= 0; layer--) {
|
||||||
|
|
||||||
// ignore text-input layer
|
|
||||||
if (layer == LyrIMPopup)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (layer == LyrFadeOut)
|
if (layer == LyrFadeOut)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
@ -124,12 +120,20 @@ void xytonode(double x, double y, struct wlr_surface **psurface, Client **pc,
|
||||||
surface = wlr_scene_surface_try_from_buffer(
|
surface = wlr_scene_surface_try_from_buffer(
|
||||||
wlr_scene_buffer_from_node(node))
|
wlr_scene_buffer_from_node(node))
|
||||||
->surface;
|
->surface;
|
||||||
/* Walk the tree to find a node that knows the client */
|
|
||||||
for (pnode = node; pnode && !c; pnode = &pnode->parent->node)
|
/* start from the topmost layer,
|
||||||
c = pnode->data;
|
find a sureface that can be focused by pointer,
|
||||||
if (c && c->type == LayerShell) {
|
impopup neither a client nor a layer surface.*/
|
||||||
|
if (layer == LyrIMPopup) {
|
||||||
c = NULL;
|
c = NULL;
|
||||||
l = pnode->data;
|
l = NULL;
|
||||||
|
} else {
|
||||||
|
for (pnode = node; pnode && !c; pnode = &pnode->parent->node)
|
||||||
|
c = pnode->data;
|
||||||
|
if (c && c->type == LayerShell) {
|
||||||
|
c = NULL;
|
||||||
|
l = pnode->data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue