我正在尝试从客户端缓冲区创建服务器端RGBA像素图.CreatePixmap和CreateImage适用于32位和24位,但XPutImage导致服务器返回匹配错误
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 72 (X_PutImage)
Serial number of failed request: 8
Current serial number in output stream: 8
Run Code Online (Sandbox Code Playgroud)
服务器支持32位pixmaps(xdpyinfo输出:https://gist.github.com/2582961 ).在ubuntu 12.04(X.Org版本:1.11.3)和OSX与X.app(X.Org版本:1.10.3)上的行为相同
为什么以下代码失败?
#include <stdlib.h>
#include <X11/Xlib.h>
int main(int argc, char **argv)
{
int width = 100;
int height = 100;
int depth = 32; // works fine with depth = 24
int bitmap_pad = 32; // 32 for 24 and 32 bpp, 16, for 15&16
int …
Run Code Online (Sandbox Code Playgroud)