-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create and specify custom color maps #9
Create and specify custom color maps #9
Conversation
Part of the quest for transparent windows/colors
writeIntNative(u32, buf + 8, args.window_id); | ||
writeIntNative(u32, buf + 12, args.visual_id); | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
X11 protocol docs: https://www.x.org/releases/current/doc/xproto/x11protocol.html#requests:CreateColormap
CreateColormap
1 78 opcode
1 alloc
0 None
1 All
2 4 request length
4 COLORMAP mid
4 WINDOW window
4 VISUALID visual
@@ -952,7 +954,7 @@ pub const window = struct { | |||
save_under: bool = false, | |||
event_mask: u32 = 0, | |||
dont_propagate: u32 = 0, | |||
colormap: Colormap = .copy_from_parent, | |||
colormap: NonExhaustive(Colormap) = .copy_from_parent, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are making this non-exhaustive so we can specify a custom color map ID
writeIntNative(u16, buf + 2, len >> 2); | ||
writeIntNative(u32, buf + 4, id); | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
X11 protocol docs: https://www.x.org/releases/current/doc/xproto/x11protocol.html#requests:FreeColormap
FreeColormap
1 79 opcode
1 unused
2 2 request length
4 COLORMAP cmap
Commands look reasonable. Would be nice to add some usage of the commands to |
Create and specify custom color maps
Part of the quest for transparent windows/colors. I was able to get transparency/alpha working with these changes on top of #8. See MadLittleMods/fps-aim-analyzer#2 as an example.