他们是否是使特定窗口在Linux上无边界的标准方法?我相信窗口边框是由您的窗口管理器绘制的,所以可能我只需要使用一个特定的窗口管理器(可以找到,我只需要知道哪个窗口管理器即可)…我希望是所有的窗口管理器都可能遵循一些标准,使我能够以编程方式执行此操作…
使用Xlib和old _MOTIF_WM_HINTS:
_MOTIF_WM_HINTS
struct MwmHints { unsigned long flags; unsigned long functions; unsigned long decorations; long input_mode; unsigned long status; }; enum { MWM_HINTS_FUNCTIONS = (1L << 0), MWM_HINTS_DECORATIONS = (1L << 1), MWM_FUNC_ALL = (1L << 0), MWM_FUNC_RESIZE = (1L << 1), MWM_FUNC_MOVE = (1L << 2), MWM_FUNC_MINIMIZE = (1L << 3), MWM_FUNC_MAXIMIZE = (1L << 4), MWM_FUNC_CLOSE = (1L << 5) }; Atom mwmHintsProperty = XInternAtom(display, "_MOTIF_WM_HINTS", 0); struct MwmHints hints; hints.flags = MWM_HINTS_DECORATIONS; hints.decorations = 0; XChangeProperty(display, window, mwmHintsProperty, mwmHintsProperty, 32, PropModeReplace, (unsigned char *)&hints, 5);
这些天NETWM / EWMH提示是首选,但据我所知,所有现代的窗口管理器还支持这一点。