小编Uli*_*ter的帖子

如何创建位深度为32的窗口

我正在尝试创建一个深度为32的X11窗口,以便我可以使用ARGB颜色.这是我做的:

XVisualInfo vinfo;
int depth = 32;
XMatchVisualInfo(dpy, XDefaultScreen(dpy), depth, TrueColor, &vinfo);
XCreateWindow(dpy, XDefaultRootWindow(dpy), 0, 0, 150, 100, 0, depth, InputOutput,
    vinfo.visual, 0, NULL);

这是发生的事情:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  1 (X_CreateWindow)
  Serial number of failed request:  7
  Current serial number in output stream:  7

有关BadMatch错误原因的任何指示?

x11 transparency argb

9
推荐指数
1
解决办法
7961
查看次数

autotools:启用编译器警告

对于基于autotools的C项目,我想从编译器中获得更多警告(例如至少在CFLAGS中使用-Wall).在不破坏任何内容的情况下启用编译器标志的首选方法是什么?是否有m4宏来测试编译器是否理解给定的编译器标志?有了这样一个宏,我能做到

TEST_AND_USE(-Wall -Wextra <other flags>)
Run Code Online (Sandbox Code Playgroud)

谢谢

c autotools compiler-warnings

5
推荐指数
3
解决办法
1472
查看次数

标签 统计

argb ×1

autotools ×1

c ×1

compiler-warnings ×1

transparency ×1

x11 ×1