text cursor: resolve WINGs target for fake_leader dialogs
Motion events in dialogs (fake_leader frame_bufs with low IDs) were not resolving the WINGs child view, so WME_ENTER was never sent to the text field. Now look up the WINGs panel via client_leader.
This commit is contained in:
parent
1e4d36143e
commit
c343dfc00a
|
|
@ -9,6 +9,7 @@
|
|||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "../../screen.h"
|
||||
#include "../../window.h"
|
||||
#include "wl_types.h"
|
||||
#include <WINGs/WINGsP.h>
|
||||
|
||||
|
|
@ -94,10 +95,21 @@ handle_pointer_motion(struct wl_listener *listener, void *data)
|
|||
/* Resolve WINGs child view (slider, etc.) at pointer for
|
||||
* motion routing during drag operations. */
|
||||
struct W_View *mtarget = NULL;
|
||||
WNativeWindow wings_hit = 0;
|
||||
if (fb && fb->id >= 0x20000000) {
|
||||
wings_hit = fb->id;
|
||||
} else if (fb) {
|
||||
WObjDescriptor *_d = wm_backend->context_find(fb->id, WM_CTX_CLIENT_WIN);
|
||||
if (_d && _d->parent_type == WCLASS_WINDOW) {
|
||||
WWindow *_w = (WWindow *)_d->parent;
|
||||
if (_w->client_leader >= 0x20000000)
|
||||
wings_hit = _w->client_leader;
|
||||
}
|
||||
}
|
||||
if (wings_hit) {
|
||||
extern W_View *W_GetViewForWindow(unsigned long id);
|
||||
extern struct W_View *W_FindViewAtPoint(struct W_View *parent, int x, int y);
|
||||
W_View *toplevel = W_GetViewForWindow((unsigned long)fb->id);
|
||||
W_View *toplevel = W_GetViewForWindow((unsigned long)wings_hit);
|
||||
if (toplevel) {
|
||||
mtarget = W_FindViewAtPoint(toplevel,
|
||||
wev.u.motion.x, wev.u.motion.y);
|
||||
|
|
|
|||
Loading…
Reference in New Issue