Questions tagged [xcb]

XCB, an "X-protocol C Binding", is a library for marshaling X Window System network protocol requests and responses. It is intended to replace Xlib.

XCB, an "X-protocol C Binding", is a library for marshaling X Window System network protocol requests and responses. It provides a C API for X clients to connect to and communicate with X servers.

XCB is intended to replace Xlib, the original X client library for C that dates to the mid 1980s. Modern releases of Xlib no longer do their own network access, leaving that work to XCB. This, together with small bits of extra API in both libraries, allows programs and libraries that were written against the Xlib API to incrementally migrate to using XCB instead. As a result, an increasing number of X-related libraries now rely on XCB even though they expose Xlib-style APIs.

If you just want to write graphical applications, you should look at high-level toolkits such as Gtk+ or Qt rather than the low-level protocol bindings like Xlib or XCB.

298 questions
124
votes
21 answers

"Failed to load platform plugin "xcb" " while launching qt5 app on linux without qt installed

I wrote application for linux which uses Qt5. But when I am trying to launch it on the linux without Qt SDK installed, the output in console is: Failed to load platform plugin "xcb". Available platforms are: How can I fix this? May be I need to…
locomotion
  • 1,568
  • 3
  • 11
  • 16
16
votes
2 answers

Is XCB ready for production use? Should I use Xlib instead?

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?
x-x
  • 7,287
  • 9
  • 51
  • 78
14
votes
1 answer

How to display an image into an XCB window?

I'm having trouble displaying an image (PNG extracted with libpng) into an XCB window, it is always entirely empty/white. I'm pretty sure the PNG extraction is correct since I can perfectly re-write it into another file. I've tried everything I…
Razakhel
  • 732
  • 13
  • 34
13
votes
3 answers

How to send key event to application using XCB?

How can I send a key press or key release event to a window (the currently active window) from another program using XCB? I found some tutorials using XLib, however I would like to use XCB. I guess I will have to call xcb_send_event, however I have…
ar31
  • 3,576
  • 1
  • 25
  • 22
12
votes
1 answer

Qt Threading Issues in Linux

I have been developing with Qt for some time now on my project, and we are starting to move to a more thread-oriented design. Upon moving some GL rendering widgets to other threads I have discovered some very weird behavior. It appears that if a GL…
kelano
  • 293
  • 3
  • 14
10
votes
2 answers

xcb ignoring repeated keys

I am trying to work out how to ignore repeated keys when using xcb for input. I need something like this acheives: uint32_t mask = XCB_KB_AUTO_REPEAT_MODE; uint32_t values[] = {XCB_AUTO_REPEAT_MODE_OFF,…
RamblingMad
  • 5,332
  • 2
  • 24
  • 48
9
votes
5 answers

Mint: genymotion installation bug

I'm newbie with Mint. I installed Genymotion emulator from the .bin file in /home/user/Android directory. And when I'm trying to execute Genymotion I receive such message: /Android/genymotion $ ./genymotion ./genymotion: error while loading shared…
Autumn_Cat
  • 790
  • 1
  • 14
  • 28
8
votes
1 answer

How to exit program with close button in XCB

Can not find any reference on how to close application by the "X" button. I'm programming using XCB and want to close the program by the "X" button. I looked and can't find anything about it. I know how to close by pressing a button. Also, by…
Matthew Beck
  • 339
  • 3
  • 10
8
votes
2 answers

If "pure XCB" OpenGL is impossible, then what's the use of the XCB/GLX API found in xcb/glx.h?

The official XCB documentation tells us that using OpenGL purely with XCB is impossible: one must also use Xlib. This post by Bart Massey (creator of XCB) doesn't suggest this should be impossible. But I'm sure I'm missing something. I've spent…
étale-cohomology
  • 2,098
  • 2
  • 28
  • 33
8
votes
4 answers

Window position in Xlib

How to get top-level window position relative to root window (i.e. whole screen) using plain ol' xlib (or brand new XCB)?
8
votes
1 answer

How do I get the resolution of RandR outputs through the xcb RandR extension?

I'm working on a project that is already using xcb and need to get the resolution of individual outputs rather than the resolution of the combined screen. Can I do this with the RandR extension for xcb? If so, how can I use my xcb_connection_t…
Aaron Landis
  • 103
  • 8
8
votes
2 answers

Obtain keyboard layout and keysyms with XCB

I'm creating an on-screen keyboard for Linux integrated in a simple Window Manager. I'm currently using XCB, and now I want to make the fake keystrokes. Everything works fine using xtest extension, except for the detail that I can't get the true…
Rastersoft
  • 114
  • 1
  • 6
7
votes
1 answer

Convert from Xlib to xcb

I am currently porting one of my applications from Xlib to libxcb and I am having a bit trouble finding informations on the XInput2 extension I use at some point. Is there an XInput2 implementation in libxcb? If yes, where can I find the…
Nidhoegger
  • 4,973
  • 4
  • 36
  • 81
7
votes
3 answers

XCB – Not receiving motion notify events on all windows

I am trying to be notified about any pointer motion. Since I don't want to run as the window manager, I need to set XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_POINTER_MOTION on all windows which I do both on startup and when I get a create…
Ingo Bürk
  • 19,263
  • 6
  • 66
  • 100
7
votes
1 answer

XCB get events of all windows X.Org

I'm currently working on a latency test for Linux. For minimizing side effects I try to write a C-program which directly accesses the X-Server with XCB. Because not having any experience in C, but only in Java, nor in XCB, I ran into a few…
Beneter
  • 71
  • 1
  • 4
1
2 3
19 20