* another window. This make xf_error_handler() a potential
* debugger breakpoint.
*/
+
XUngrabKeyboard(d, CurrentTime);
return xf_error_handler(d, ev);
}
XFree(data);
}
+ xfc->_XWAYLAND_MAY_GRAB_KEYBOARD =
+ XInternAtom(xfc->display, "_XWAYLAND_MAY_GRAB_KEYBOARD", False);
xfc->_NET_WM_ICON = XInternAtom(xfc->display, "_NET_WM_ICON", False);
xfc->_MOTIF_WM_HINTS = XInternAtom(xfc->display, "_MOTIF_WM_HINTS", False);
xfc->_NET_CURRENT_DESKTOP = XInternAtom(xfc->display, "_NET_CURRENT_DESKTOP", False);
*/
void xf_SendClientEvent(xfContext* xfc, Window window, Atom atom, unsigned int numArgs, ...)
{
- XEvent xevent;
+ XEvent xevent = { 0 };
unsigned int i;
va_list argp;
va_start(argp, numArgs);
- ZeroMemory(&xevent, sizeof(XEvent));
+
xevent.xclient.type = ClientMessage;
xevent.xclient.serial = 0;
xevent.xclient.send_event = False;
}
window->floatbar = xf_floatbar_new(xfc, window->handle, name, settings->Floatbar);
+
+ if (xfc->_XWAYLAND_MAY_GRAB_KEYBOARD)
+ xf_SendClientEvent(xfc, window->handle, xfc->_XWAYLAND_MAY_GRAB_KEYBOARD, 1, 1);
+
return window;
}
FocusChangeMask | PropertyChangeMask | ColormapChangeMask | OwnerGrabButtonMask;
XSelectInput(xfc->display, appWindow->handle, input_mask);
+ if (xfc->_XWAYLAND_MAY_GRAB_KEYBOARD)
+ xf_SendClientEvent(xfc, appWindow->handle, xfc->_XWAYLAND_MAY_GRAB_KEYBOARD, 1, 1);
+
return 1;
}