If one needs low level access to X11 events, windowing and input without using GTK, QT et al., should one use Xlib or XCB? What are the pros and cons of each?
Is XCB ready for production use? Should I use Xlib instead?
10k views Asked by x-x At
2
There are 2 answers
0
gatis paeglis
On
What helps when learning XCB is to look at X11 specification, for example here https://www.x.org/releases/current/doc/xproto/x11protocol.pdf
Most XCB calls map directly to X11 requests. The same is true for extensions.
Related Questions in LINUX
- Is there some way to use printf to print a horizontal list of decrementing hex digits in NASM assembly on Linux
- Why does Hugo generate different taxonomy-related HTML on different OS's?
- Writes in io_uring do not advance the file offset
- Why `set -o pipefail` gives different output even though the pipe is not failing
- what really controls the permissions: UID or eUID?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Docker container unable to make HTTPS requests to external API
- Whow to use callback_query_handler in Python 3.10
- Create kea runtime directory at startup in Yocto image
- Problem on CPU scheduling algorithms in OS
- How to copy files into the singularity sandbox?
- Android kernel error: undefined reference to `get_hw_version_platform'
- Is there a need for BPF Linux namespace?
- Error when trying to execute a binary compiled in a Kali Linux machine on an Ubuntu system
- Issue with launching application after updating ElectronJs to version 28.0.0 on Windows and Linux
Related Questions in UNIX
- Reading & Writing to the same file from terminal
- `df` command not capturing entire output in perl
- Why is it that when I pass certain directory names to `ls`, sometimes it does not list their contents?
- Detect Mouse Clicks; Terminate Program on Scroll Wheel Movement
- grep expression behaving weird (unix/mac) while reading a conf file
- Unix sub path creation and copy files
- Ignoring folders in The Silver Searcher `ag`
- struct nameidata-Linux Kernel Module
- telegraf service not able to retrieve data using the journalctl commands
- Order of options in Unix sed for editing files in-place
- Trying to echo line variable along with another variable inside a while read loop
- failed to handshake with xxx: authentication error?
- UDP socket client not able to receive data
- Invalid SCA token in unix
- How can I keep randomized UNIX timestamp in specific hour range in SQL?
Related Questions in X11
- How can I set an uncommon screen resolution on GNU/Linux with an Arc 380 GPU and X11?
- Create screenshot and encode it in base64
- Rasppberry pi Remote Desktop Conection Problem
- GithubActions - PlatformError: X11: The DISPLAY environment variable is missing
- Unable to run X11 applications remotely via XQuartz on a mac
- WSL2 OpenAI Gym - render segmentation fault
- Converting BufferedImage to Pixmap
- Is there a lightweight GUI protocol like X11 that works well over ssh?
- dropdown is closing quickly without any action when tried to open it. it is a motif Xt library based application
- XCreateWindow - parent argument implications
- Drawing image to root window in Xorg using Xcb causes it to cover other windows
- How to open a GUI-Application on a Server (Raspi) via SSH using python/paramiko?
- Switch layouts and get char without X11 by driver?
- Xrandr making DisplayWidth() return incorrect value?
- Xlib Window Manager: Closing Focused Window Causes Unexpected Shutdown
Related Questions in WINDOW-MANAGERS
- Basic window manager: Z-order ping-pong between overlapping windows
- Xlib Window Manager: Closing Focused Window Causes Unexpected Shutdown
- How can I track button release events?
- Combine pinned apps and tasklist/open clients
- Disable X's middle-mouse paste functionality in a window manager
- Switch between multiple instances of the same app via alt-` in Windows 11
- Issue with displaying a custom layout over the Android accessibility screen
- root.overrideredirect() removes tkinter app from taskbar
- Force The Location Of A Gtk4 Window On A Wayland WM
- In AwesomeWM(git) is it possible to resize floating windows without rendering their contents in real time? (box resize)
- WindowManager: BadTokenException with Accessibility service context
- Issue with Caliburn Micro's WindowManager Method in WPF - Window Minimization Problem
- Tkinter methods lift(), lower(), deiconify() and geometry() not working (properly or at all) on Linux Mint Cinnamon
- XMonad IndependantScreens does not load workspaces on second Screen at startup
- Windows 11 application timing becomes uneven when "backgrounded"
Related Questions in XCB
- Linux QT-based applications are core dumping with IOT instruction (core dumped)
- Getting one time error "qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow)", what am I missing, or mishandling?
- Drawing image to root window in Xorg using Xcb causes it to cover other windows
- The background color of xcb window is black
- BadValue on X_ChangeProperty when calling glXChooseFBConfig() on XCB connection?
- How can I track button release events?
- Disable X's middle-mouse paste functionality in a window manager
- Strange problem with X11 positioning of the windows and window manager interactions
- Infinite loop bug with XCB. How can I fix this?
- Opaque elements in transparent window in Xorg
- How can I get an "XCB_MAP_REQUEST" for a window I am trying to map?
- I get drawing artifacts when drawing onto a transparent xcb window. How do I fix this?
- How can I set the background image in Xorg with xcb?
- Draw an image with transparent color in X11 using XCB
- Why is xcb_key_symbols_alloc returning NULL on big screens?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You can use both of them. XCB is simpler to use, has a better response to a multithread environment but lacks documentation, while Xlib is a more dated/complex tool, better documented and fully implemented.
I'm currently studying the XCB API and the hardest thing to do is to find docs and good API references..
In the end: if you aim to faster development, you should use Xlib, otherwise XCB is meant to be the future (but it's still far from being such).