java-native-access/jna · error · X11Exception
Cannot get window manager info properties. (_NET_SUPPORTING_
Error message
Cannot get window manager info properties. (_NET_SUPPORTING_WM_CHECK or _WIN_SUPPORTING_WM_CHECK)
What it means
X.getWindowManagerInfo() tries to read the _NET_SUPPORTING_WM_CHECK root-window property (EWMH), falling back to _WIN_SUPPORTING_WM_CHECK. If both property reads raise X11Exception, it throws X11Exception 'Cannot get window manager info properties...'. This means no EWMH-compatible window-manager info could be retrieved from the root window.
Source
Thrown at contrib/x11/src/jnacontrib/x11/api/X.java:169
return atom;
}
/**
* Returns the window manager information as an window.
*
* @return window manager information as an window
* @throws X11Exception thrown if X11 window errors occurred
*/
public Window getWindowManagerInfo() throws X11Exception {
Window rootWindow = getRootWindow();
try {
return rootWindow.getWindowProperty(X11.XA_WINDOW, "_NET_SUPPORTING_WM_CHECK");
} catch (X11Exception e) {
try {
return rootWindow.getWindowProperty(X11.XA_CARDINAL, "_WIN_SUPPORTING_WM_CHECK");
} catch (X11Exception e1) {
throw new X11Exception("Cannot get window manager info properties. (_NET_SUPPORTING_WM_CHECK or _WIN_SUPPORTING_WM_CHECK)");
}
}
}
/**
* Returns the root window.
*
* @return root window
*/
public Window getRootWindow() {
return new Window(this, x11.XDefaultRootWindow(x11Display));
}
/**
* Returns the current active window.
*
* @return current active window
* @throws X11Exception thrown if X11 window errors occurredView on GitHub (pinned to d036ad9781)
Solutions
- Verify a window manager is running and EWMH-compliant (most modern WMs set _NET_SUPPORTING_WM_CHECK).
- Use xprop -root | grep SUPPORTING to confirm the property exists before calling the API.
- In headless/test setups, run a lightweight EWMH WM (e.g. openbox, mutter, i3) alongside Xvfb.
- Catch X11Exception and degrade: proceed without WM info instead of failing the whole operation.
Example fix
// before
X.Window wmInfo = x.getWindowManagerInfo();
// after
try {
X.Window wmInfo = x.getWindowManagerInfo();
} catch (X11Exception e) {
LOG.warn("No EWMH window manager detected, skipping WM info");
} Defensive patterns
Strategy: try-catch
Validate before calling
// shell probe before calling the API // xprop -root _NET_SUPPORTING_WM_CHECK (non-empty => supported)
Try / catch
try {
info = x.getWindowManagerInfo();
} catch (X11Exception e) {
info = null; // no EWMH WM present; continue without WM info
} Prevention
- Ensure an EWMH-compliant window manager is running on the display.
- Probe with xprop -root during environment setup/CI.
- Delay calls until after WM startup.
- Design APIs to tolerate missing WM properties.
When it happens
Trigger: Calling getWindowManagerInfo on a system where the window manager does not set _NET_SUPPORTING_WM_CHECK or _WIN_SUPPORTING_WM_CHECK on the root window, or when reading the property fails (wrong type/atom, no WM running).
Common situations: Bare X server with no window manager (Xvfb sessions), minimal tiling WMs without EWMH support, or Wayland sessions where the X root-window properties don't exist.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Cannot get client list properties (_NET_CLIENT_LIST or _WIN_
- Cannot get number of desktops properties (_NET_NUMBER_OF_DES
- Cannot get current desktop properties (_NET_CURRENT_DESKTOP
- Cannot get desktop names properties (_NET_DESKTOP_NAMES or _
- Can't open X Display
AI-assisted analysis of java-native-access/jna@d036ad9781 (2026-09-12).
Data as JSON: /api/errors/fa29df54e932b9fa.
Report an issue: GitHub.