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
7
votes
2 answers

Qt5 install on OSX -qt-xcb

I am stuck with a problem installing Qt5 on OSX. The Qt Requirements for Mac OSX are done - Xcode and command line are installed. Then I followed the steps: # mkdir qt5 # cd qt5 # git clone git://gitorious.org/qt/qtbase.git # cd qt5 #…
ThreaderSlash
  • 1,313
  • 3
  • 27
  • 43
7
votes
2 answers

xcb keyboard button masks meaning

I'm trying to figure what keys are handled by: XCB_MOD_MASK_1 XCB_MOD_MASK_2 XCB_MOD_MASK_3 XCB_MOD_MASK_4 XCB_MOD_MASK_5 in xcb, for XCB_MOD_MASK_1 it seems to be Alt (i'm correct?), but for others button i cannot find the mapping anywhere (i…
Ivan
  • 4,186
  • 5
  • 39
  • 72
6
votes
1 answer

With X11, how can I get the user's time "away from keyboard" while ignoring certain events?

I'm making a little application that needs to know how long the user has been idle — as in, not using a keyboard or a mouse. Both XCB and Xlib promise to give me idle time through their respective screensaver extensions. Here is where I get idle…
Dylan McCall
  • 233
  • 1
  • 2
  • 10
6
votes
0 answers

PyQt Error XcbConnection: Failed to initialize XRandr on Ubuntu

I am developing a GUI using PyQt5 on a server with Ubuntu 14.04 via VNC. After I run the following command: import sys from PyQt5.QtWidgets import QApplication app = QApplication(sys.argv) I always get the following error message: QXcbConnection:…
xxl
  • 61
  • 4
6
votes
1 answer

Integrating XCB and libX11 event loops - hanging on select/poll inside Xt

I am trying to integrate two bodies of code into the same process that each previously had independent event loops for their respective GUI toolkits - one of them using Xt, and the other using Qt5. The intention is just to be able to display Qt…
kdm
  • 91
  • 6
6
votes
0 answers

Perfomance of (XGetImage + XPutImage) VS XCopyArea VS (XShmGetImage + XShmPutImage) VS GTK+

I'm new not only to Xlib but to Linux interface programing as well. I'm trying to solve common task(which is not so common as it seems to be, as I can't find any reliable example) of drawing content of one window into another. However I've faced…
5
votes
1 answer

X11 How to restore/raise another application window using xcb?

I am writing a window list into my C application that shows all of the top level windows, including shaded, minimized, and on other desktops. I would like to restore unmapped (minimized) windows, raise the window, and switch to the window's…
Bob Shaffer
  • 635
  • 3
  • 13
5
votes
1 answer

What event is used for Maximizing/Minimizing?

Currently I am in charge of developing a (C++) window class for a little project; the goal is to keep dependencies at a bare minimum. The implementation for Win32/WinAPI works as supposed, however, I am struggling when it comes to Linux/XCB. I am…
user1596212
5
votes
1 answer

How to draw titlebar with XCB

I am working on a simple window manager in c with libxcb and I am trying to decorate a window with a titlebar, icon and min/max/close buttons. I test my wm in Xephyr. I can spawn a new xterm window, move it around and resize it. But now I would like…
Carlito
  • 805
  • 10
  • 20
5
votes
2 answers

Create OpenGL Context only with XCB

I want to create OpenGL Context only with XCB without GLX and Xlib. Could you tell me that might be happened.
Miroslav Avramov
  • 107
  • 1
  • 1
  • 9
5
votes
2 answers

How do I interrupt xcb_wait_for_event?

In a separate thread (std::thread), I have an event loop that waits on xcb_wait_for_event. When the program exits, I'd like to shut things down nicely by interrupting (I have a solution that sets a thread-local variable, and checkpoints in the loop…
cdbfoster
  • 339
  • 4
  • 13
5
votes
1 answer

How to use shm pixmap with xcb?

I try to learn how to use shared memory pixmaps in the xcb library. Did any of you have experience with this and want to share example codes and/or information? This would be very helpful. Thanks
bakkaa
  • 673
  • 6
  • 25
5
votes
2 answers

How do I provide the _NET_WM_STATE_FULLSCREEN hint with xcb?

I'm trying to write a fullscreen application with xcb for my own edification and I'm having trouble with the above. I've found a couple pieces of code that do this using Xlib, but none with xcb. I've found the xcb_ewmh_connection_t structure and…
cdbfoster
  • 339
  • 4
  • 13
5
votes
2 answers

XCB STRING and WM_NAME not defined

Where are STRING and WM_NAME defined? My xcb_atom.h file only contains 3 function declarations, when I was expecting it to look like this: http://www.opensource.apple.com/source/X11libs/X11libs-40/xcb-util/xcb-util-0.3.3/atom/xcb_atom.h I also have…
Pubby
  • 51,882
  • 13
  • 139
  • 180
5
votes
1 answer

Do I need to disconnect an xcb_connection_t that I got from XGetXCBConnection?

Here's an example I saw for some GLX code: display = XOpenDisplay(0); // ... xcb_connection_t *connection = XGetXCBConnection(display); // ... XCloseDisplay(display); I noticed that there was no xcb_disconnect in there. Is this correct? Also, is…
Pubby
  • 51,882
  • 13
  • 139
  • 180
1
2
3
19 20