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
4
votes
1 answer

CLion with WSL try to run QT application (xcb can not be loaded)

I am trying to run the code from here https://github.com/vt4a2h/uml-tool and I found myself stuck with this error message: qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was…
Mircea
  • 1,671
  • 7
  • 25
  • 41
4
votes
1 answer

qt.qpa.xcb: could not connect to displayerror while using OpenCV on ec2 ubuntu server 20.0

I am trying to run Tesseract Ocr code as mentioned here https://www.pyimagesearch.com/2018/09/17/opencv-ocr-and-text-recognition-with-tesseract/ on ec2 ubuntu server 20.0. I am facing an error on: cv2.imshow("Text Detection", output) The error is…
sumesh shetty
  • 251
  • 2
  • 9
4
votes
1 answer

Get keycode from key name in XCB?

I'm currently working a small XCB application, but I'm having a hard time finding an alternative for the following routine: XKeysymToKeycode(display, XStringToKeysym("Tab")) I managed to get the keycode via xmodmap -pke and hardcoded into the…
vinnylinux
  • 7,050
  • 13
  • 61
  • 127
4
votes
1 answer

Why Qt plaftorm plugin "xcb" cannot be loaded even though it was found?

I cross-compiled Qt5.12 in my laptop and installed it on a Raspberry Pi 3 that runs Raspbian Stretch OS. I'm trying to remote debug (from QtCreator) applications running on RPi. When I run my Qt apps from RPi terminal with a command like ./app…
rrd
  • 175
  • 7
4
votes
1 answer

VkSurfaceKHR does not to update when resizing xcb window

I have followed the tutorial at https://vulkan-tutorial.com... I created it without using the GLFW etension. So far I'm up to "Swap chain Recreation", and all is setup and rendering correctly. However, I can't seem to get resizing working…
ZeunO8
  • 422
  • 6
  • 25
4
votes
1 answer

X11: Get notified when the window is moved

My apps needs to know when it's window is moved (I need to know the exact position of my app's window relative to the screen (root window / absolute position) - e.g. the one returned by xcb_translate_coordinates with dst_window set to the root…
Paulus
  • 181
  • 6
4
votes
1 answer

python: PID to X11 Window ID using XResQueryClientIds

Note: This is a continuation of the answer to What process created this X11 window? from unix.stackexchange. That answer mentions XResQueryClientIds from X-Resource v1.2 extension. I'd like to know how to use it. How can I use python's xcffib…
user19087
  • 1,899
  • 1
  • 16
  • 21
4
votes
1 answer

No error on xcb_grab_key but event loop not catching (Global Hotkey)

I am trying to set up a global hotkey on Linux. I had initially used x11 (libX11.so) however I had to do this from a thread. I tried it but the XPendingEvent and XNextEvent would eventually crash the app. So I switched to xcb (libxcb.so.1). There is…
Noitidart
  • 35,443
  • 37
  • 154
  • 323
4
votes
1 answer

Get window title with XCB

I am trying to get information about the window in focus. It seems that I get a correct window id from xcb_get_input_focus_reply_t->focus: it stays the same for my Eclipse IDE (56623164) and is another for any other window in focus. However, the…
Matthias
  • 7,432
  • 6
  • 55
  • 88
4
votes
2 answers

X11 non-clipped child windows

Does X have the notion of non-clipped child windows? The behavior in Windows and OSX for these is: the parent always stays behind its children the children are closed automatically when the parent is closed the children follow the parent when…
user519179
4
votes
1 answer

How to get inner and outer window dimensions with Xlib/XCB?

Is there a reliable way to get the inner and outer rectangle of a top level window with XCB/Xlib? (IOW frame and client rectangle). Here's what I tried: xcb_get_geometry always returns the initial dimensions even after the window gets resized (what…
user519179
4
votes
3 answers

How to get the screen of a window with XCB?

In Xlib, XWindowAttributes structure contains a pointer to the screen that the window is on. But in the corresponding structure of XCB (xcb_get_window_attributes_reply_t), there is no such member. What should I do?
Magicloud
  • 818
  • 1
  • 7
  • 17
4
votes
0 answers

Global alt+space hotkey grabbing - weird keyboard focus behaviour

I'm grabbing Alt+Space global hotkey using xcb_grab_key, as follows: xcb_key_symbols_t *keysyms = xcb_key_symbols_alloc(c); xcb_keycode_t *keycodes = xcb_key_symbols_get_keycode(keysyms, XK_space), keycode; // add bindings for all…
jkozera
  • 3,016
  • 2
  • 16
  • 11
4
votes
2 answers

Where to learn X11 and XCB?

I want to create a software that requires X11 render window that is stacked on the top and grabs the keyboard and mouse(just like a screen locker) but all I could find was a shallow documentation with very few examples. How shall I proceed?
Alexander Suraphel
  • 10,103
  • 10
  • 55
  • 90
4
votes
1 answer

How to get event when new application launches using XCB

I am trying to make a very simple window manager for learning purposes. I am using C and the xcb library. I am trying to get an event raised if a new application is launched. For now, I create a root window where I can receive mouse and keyboard…
Carlito
  • 805
  • 10
  • 20
1 2
3
19 20