它们是在Linux上使特定窗口无边框的标准方法吗?我相信窗口边框是由你的窗口管理器绘制的,所以我可能只需要使用一个特定的窗口管理器(可以找到,我只需要知道哪一个)…我的希望是那样的所有窗口管理器都可能遵循一些标准,允许我以编程方式执行此操作…
解决方法:
使用Xlib和旧的_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 hints是首选,但据我所知,所有现代窗口管理人员仍然支持这一点.