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.

0
votes
0answers
9 views

xcb_get_image_reply fails for window on another workspace/desktop

Ubuntu (xfce) provides virtual desktops aka workspaces. I would like to get a screenshot of an application which is placed on another virtual desktop. I successfully create xcb connection and I can ...
0
votes
1answer
67 views

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 ...
1
vote
1answer
35 views

No event received when X11 client sets _NET_WM_STATE_DEMANDS_ATTENTION

I'm building a taskbar for an X11 desktop and so far I've been successful in detecting new and removed windows and changes to window titles and icons. However, despite setting every event mask I can ...
0
votes
0answers
17 views

SDL_UpdateRects and not visible changes on xcb_get_image_reply

Application is using SDL 1.2.15 (cannot be upgraded) and draws itself using SDL_UpdateRects. After such paint it notifies another app which tries to get screenshot by xcb_get_image_reply. Problem is ...
0
votes
0answers
27 views

How to port QApplication::x11EventFilter to XCB QAbstractNativeEventFilter

I already posted a question in Qt forum (here: https://forum.qt.io/topic/101608/how-to-port-qapplication-x11eventfilter-to-xcb-qabstractnativeeventfilter) but without success yet, I post it here too ...
0
votes
1answer
67 views

Running Qt GUI Application on VNC cause Segmentation Fault with error message

I'm trying to run a Qt 5.8 GUI application in vncviewer and I'm getting a segmentation fault. System Configuration Qt 5.8 Ubuntu 17.04 vncserver Xvnc Free Edition 4.1.1 - built Feb 25 2015 23:...
0
votes
0answers
164 views

How can i write an X11 compositor using Qt5?

I'd like to write a simple compositor. My goal is to be able to move windows around and render the whole screen with as little effort as possible. I'm planning to use Qt5 to draw something. Qt has a ...
1
vote
0answers
11 views

Is there a standard non-window exit event?

I have an application that can have 1 or more active windows. Currently I'm thinking of logic such that when all windows are closed, the application run-loop will exit gracefully and main() would ...
2
votes
0answers
34 views

Where can I find the implementation of xcb library?

I try to learn xcb and since the documentation is quite sparse, I would like to study the implementation of the methods itself. For instance, the definition of the method xcb_poly_line is not given in ...
0
votes
2answers
59 views

resolving undefined references xcb

I can include items from xcb/xcb.h, but not items that are outlined in /usr/include/xcb/randr.h. My preference is to use C++, but to help debug I also tried C which produced variations of the same ...
1
vote
1answer
56 views

Is there a way for xcb to load a file into a pixmap?

I'm writing an application with rust-xcb. However, when I try to load a file into a pixmap I cannot find any way to do it. I also use image library to load image files (jpg). But I am not familiar ...
1
vote
1answer
106 views

Request image from X11 compositing WM in C or C++

I need to request and retrieve an image of a window from the X server or the WM (I believe the WM does the actual compositing). I need to be able to get an image of the window even if it is obscured ...
3
votes
1answer
210 views

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, ...
1
vote
0answers
23 views

how to get window's position when the window is moving in xlib / xcb

on Ubuntu 18.04 KDE desktop, I can not get exactly window's position when window is moving. Using xcb_get_geomerty() function, I can get window's position. But when window is moving, the position ...
0
votes
0answers
27 views

Recording of events by grabbed windows in x11

Suppose KeyPress events are being recorded by my program. Now, I create a simple window, child of the root window, and after mapping it, will grab keyboard to it using XGrabKeyboard(). Now, my ...
0
votes
1answer
52 views

Fixing a window onto the top of window stack in XCB

I wanted to know if there is any method or code available to fix a particular window (say for example a newly created window) on to the top of the window stack in xcb, so that Alt+Tab is completely ...
0
votes
0answers
59 views

Why cairo xcb surface don't update until I move the window?

I use xcb and cairo binding in rust to draw something on X. And I use a function to draw polygon (code is below): fn polygon(&self, points: &[Position], color: Color) { if points.len() &...
0
votes
4answers
272 views

gtkada-2018 Adacore installation Issue on Ubuntu-18.04.1

I'm installing gtkada-2018 (Adacore) on my Ubuntu 18.04.1 Desktop (clean installed), but it causes libxcb-xlib.so.0 warning while linking. Would anyone help me to fix this issue? I installed GNAT ...
2
votes
1answer
49 views

Weird recursive behavior using XCB

I'm exploring creating a window manager using XCB, but I've run into some troubles pretty early on. My code won't even connect to XCB with xcb_connect. I thought it was pretty straightforward, but I'm ...
1
vote
1answer
168 views

UTF8 char array to std::wstring

I just trying to get x11 window title, and store it in std::wstring. I use such command to get the title auto req_title = xcb_get_property(conn, 0, window, XCB_ATOM_WM_NAME, XCB_GET_PROPERTY_TYPE_ANY,...
1
vote
1answer
187 views

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. ...
0
votes
1answer
223 views

X11: Get the list of main windows using xcb

I'm trying to get the list of the main windows of already launched X applications, with a C program using xcb library. It seems these windows are the "top-level windows" according to this question: ...
0
votes
0answers
27 views

Detecting keyboard grabs via X11

I'm attempting to write a virtual touchscreen keyboard for X11 that only appears once a text entry widget is selected, but before any actual text can be entered. This should work independent of which ...
0
votes
0answers
20 views

Need hint for custom window management

I recently started a new project on a NanoPI Fire2A board, using their Ubuntu 16.04 custom built image. With the 4.3" touch LCD, I'm trying to build a custom interface to make a customized PDA, but I ...
0
votes
0answers
45 views

XCB : grab button click outside window

I'm currently working on a XCB piece of software that would behave like a notification popup. For the moment it displays a window and I am able to close it when pressing the ESC key. But I would ...
1
vote
0answers
162 views

How to use libxcb on mac?

My laptop is Macbook Pro. I installed libxcb on it and tried a simple example that x.org given: #include <unistd.h> /* pause() */ #include <xcb/xcb.h> int main () { ...
0
votes
1answer
166 views

XCB xcb_window_t VS xcb_drawable_t

I'm trying to learn XCB through this link and write a little "library" so I don't forget what to do each time. I'm at the point where I have a window open and I'm almost ready to start drawing things. ...
0
votes
0answers
97 views

Qt5.9.1 + CUDA8.0: Random Crashes

I am trying to do some processing on the GPU with CUDA (version 8.0, GPU GTX980). The display is connected to this GPU. My Qt5 (version 5.9.1) application basically works fine, but randomly crashes. ...
0
votes
1answer
293 views

X11/XCB/Xlib: Copy root window to pixmap

I can copy the contents of the root window to an xcb_image_t in client (ie. CPU) memory using xcb_image_get() (regardless of its map status, although presumably the root window is always mapped?). Eg: ...
0
votes
1answer
117 views

How to get a string from an xcb_atom_t?

I want to find out the name of an xcb_randr_monitor_info_t. It has a name field, but that's of type xcb_atom_t, not a char [255] or something easy like that. How can I turn it into a (preferably UTF-8)...
0
votes
0answers
177 views

QT This application failed caused by OpenGL

I have a question about programming in QT under Linux 16.04LTS and CUDA. I am trying to develop an OpenGL application and I'm struggling when I'm trying to build app. It gives me this error: ...
0
votes
1answer
55 views

Linux XCB dockapp software for stalonetray

I'm trying to develop a small XCB software that would go in a tray application such as stalonetray. So far I managed to display a simple window using this tutorial, but I'm stuck trying to put the ...
0
votes
1answer
155 views

X11 - put image in XY format

XCB library provides function xcb_put_image. The signature of the function is: xcb_void_cookie_t xcb_put_image( xcb_connection_t *conn, uint8_t format, xcb_drawable_t drawable, ...
1
vote
1answer
478 views

How to copy a pixel array into X11 using xcb with double buffering?

I'm trying to render a 3D scene into an array of color values and display it using xcb. I am inclined to rule out using xcb_poly_point() because it does not sound like it was designed for this. ...
2
votes
0answers
654 views

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 ...
0
votes
1answer
140 views

Porting XCB events to XLib Events

I'm using Qt 5.3.2 and an input handling library called gainput. Gainput can only accept XLib events and not XCB event structures. The big problem is that Qt is using xcb. Is there some "easy" way of ...
0
votes
0answers
427 views

xcb_poll_for_event does not detect XCB_CLIENT_MESSAGE event for closing window

I am porting my application to Linux, and I am using the XCB library for window handling. I need to detect when the window closes, so that the application can exit. However, the system cannot block ...
1
vote
1answer
119 views

XShmGetImage fails without any error displayed

I have tried below simple program to use XShmGetImage to get the desktop image. #include <X11/Xlib.h> #include <X11/Xatom.h> #include <X11/Xutil.h> #include <X11/extensions/XShm....
1
vote
1answer
231 views

How do I get the X window class given a window ID with rust-xcb?

I'm trying to use rust-xcb to get a window's class given a window ID. fn get_class(conn: &xcb::Connection, id: &i32) { let window: xcb::xproto::Window = *id as u32; let class_prop: ...
1
vote
1answer
311 views

How to deal with “QXcbConnection” error message when running a python script in a local machine on a remote desktop if plotting is part of the output?

I am trying to run a python script written in my local machine on a remote desktop using the following command line on terminal: cat myscript.py | ssh [email protected]
3
votes
1answer
271 views

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 ...
0
votes
1answer
77 views

Grab the color of a pixel with Xcb instead of Xlib

I use several window manager and if i understand correctly they use xlib. (awesome,openbox,fluxbox...) I use the following code to detect the amount of "RED" in a pixel : #include <iostream> #...
1
vote
1answer
191 views

Can't get an error from xcb_get_property_reply for nonexistent _NET_WM_PID

I'm using XCB to ask X11 windows for PIDs of their processes, among other properties. My code to get various non-string attributes is as follows: xcb_window_t wid; xcb_connection_t * conn; template &...
1
vote
2answers
602 views

Get WId of active window with XCB

What would be the proper way to get the active window (the one with input focus) with XCB? reply = xcb_get_input_focus_reply(connection, xcb_get_input_focus(connection), nullptr); std::cout << ...
1
vote
1answer
514 views

X11/Xlib/xcb: Creating a window requires border pixel if specifying colormap. Why?

When creating an X window using either Xlib or xcb, I have found that I must provide the border pixel attribute if I want to provide a colormap. This requirement seems strange to me as I'm note sure ...
0
votes
0answers
208 views

Using static linked QT build with QtCreator on Linux

I'm trying to build my application with static linking, in one file. I connected a new Qt prefix into QtCreator. Application is builds, but when i trying to launch it, i got This application ...
9
votes
0answers
840 views

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 ...
3
votes
1answer
436 views

How to get unicode input from xcb without further ado

during GameDev for a cross-platform title the questions arises how to support full Unicode input in ingame-chat. Using WinAPI on Windows and xcb on Linux for general key input there are the WM_KEY_* ...
0
votes
1answer
486 views

Getting screen info with xcb and randr

I was trying to write some simple graphics with Xlib, XF86VidMode, and OpenGL. I had two issues: Xlib doesn't seem to have the equivalent of WM_TIMER, so I wrote a SIGALRM handler that sent messages ...
1
vote
1answer
1k views

Qt 5.5.1 cannot find libQt5XcbQpa.so.5

I am using Qt 5.5.1 Creator on my virtual machine (Ubuntu 12.04.5 LTS), and Beaglebone black with touch screen. When i write gui application(only one window with push button) and try to deploy it, i ...