edge: Prevent pointer click and motion events propagating to root

Avoids activating desk flips, root menus, and root window tooltips when
clicking on or moving over the edge windows.
This commit is contained in:
Kim Woelders 2022-07-22 06:33:52 +02:00
parent 032e0b3896
commit dee8d4f369
1 changed files with 4 additions and 0 deletions

View File

@ -187,10 +187,14 @@ EdgeWindowCreate(int which, int x, int y, int w, int h)
{
static const char *const names[] =
{ "Edge-L", "Edge-R", "Edge-T", "Edge-B" };
XSetWindowAttributes att;
EObj *eo;
eo = EobjWindowCreate(EOBJ_TYPE_EVENT, x, y, w, h, 0, names[which & 3]);
ESelectInput(EobjGetWin(eo), EnterWindowMask | LeaveWindowMask);
att.do_not_propagate_mask =
ButtonPressMask | ButtonReleaseMask | PointerMotionMask;
EChangeWindowAttributes(EobjGetWin(eo), CWDontPropagate, &att);
EventCallbackRegister(EobjGetWin(eo), EdgeHandleEvents, INT2PTR(which));
return eo;