This commit is contained in:
Enrico Weigelt, metux IT consult 2024-09-05 15:24:50 +02:00
parent 3802b10cdb
commit e7b358e174

View File

@ -40,6 +40,8 @@ is" without express or implied warranty.
#include "Color.h" #include "Color.h"
#include "Events.h" #include "Events.h"
#include "Args.h" #include "Args.h"
#include "Keyboard.h"
#include "Pointer.h"
DevPrivateKeyRec xnestWindowPrivateKeyRec; DevPrivateKeyRec xnestWindowPrivateKeyRec;
@ -161,6 +163,15 @@ xnestCreateWindow(WindowPtr pWin)
if (!pWin->parent) /* only the root window will have the right colormap */ if (!pWin->parent) /* only the root window will have the right colormap */
xnestSetInstalledColormapWindows(pWin->drawable.pScreen); xnestSetInstalledColormapWindows(pWin->drawable.pScreen);
/* special handling for toplevel windows in rootless mode */
if (xnestRootless && pWin->parent && !pWin->parent->parent) {
fprintf(stderr, "created toplevel window: catching input events\n");
uint32_t event_mask = XNEST_KEYBOARD_EVENT_MASK | XNEST_POINTER_EVENT_MASK;
xcb_change_window_attributes(xnestUpstreamInfo.conn,
xnestWindow(pWin),
XCB_CW_EVENT_MASK,
&event_mask);
}
return TRUE; return TRUE;
} }