Questions tagged [xlib]

Xlib is a library used to communicate with X11 servers. This is the library that widget toolkits like GTK+, Qt, and Motif use to draw their graphics, and it's considered to be low-level.

Xlib is a library used to communicate with X11 servers.

This is the library that widget toolkits like GTK+, Qt, and Motif use to draw their graphics, and it's considered to be low-level. If you're looking for a high-level GUI toolkit, you're better off looking at those toolkits instead of using Xlib directly.

Xlib was first developed in 1985. The newer XCB library is intended to replace Xlib and take over its functions, but currently very few programs use XCB.

1036 questions
5
votes
1 answer

Why egl pixmap surface works with opengl es but not with opengl?

I use EGL with Xlib and OpenGL. While I was drawing straight on the window everything was fine. Now I'm trying to use pixmaps as EGL surface but OpenGL doesn't change it at all. I clean the background with the blue color using OpenGL. Here's what I…
Nolan
  • 1,060
  • 1
  • 11
  • 34
5
votes
1 answer

Saving xlib XImage to PNG

I am using xlib. I have an XImage structure filled with information from an XGetImage() call. Is there a popular method to get from XImage to something more meaningful.. namely PNG? I have looked at libpng, but have heard from pretty much everyone…
digitalfoo
  • 1,165
  • 13
  • 14
5
votes
3 answers

X11/Xlib: Create "GlassPane"-Window

I've tried to create a fully transparent window using C++ & X11. It should not consume any events and simply forwards them to the windows below. Some kind of GlassPane as it's known for Java-Windows, but full screen. Then I'd like to draw on this…
Atmocreations
  • 9,923
  • 15
  • 67
  • 102
5
votes
1 answer

XRender Create Offscreen Picture

I'm trying to create a compositing window manager. So far it works, but when a window overlays another, it flickers like crazy. I found that it was because I was creating a Picture, and then painting to it, which caused it to paint to the screen. My…
Victor Tran
  • 516
  • 4
  • 16
5
votes
1 answer

Detect modifier key release in X11 root window

The overall goal is like Windows' Alt-Tab, so I will use these keys for explanation. I want: Press Alt -> press Tab -> [ popup appears ] -> press Tab any time holding Alt -> release Alt -> [ popup disappears ]. I can't detect final Alt…
sa7
  • 160
  • 8
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

XGetImage takes a lot of time to run

XGetImage takes 3-4 seconds to execute and completely freezes X11 Display *display; display = XOpenDisplay(NULL); if (!display) {fprintf(stderr, "unable to connect to display");return 7;} Window w; int x,y,i; unsigned m; Window…
Adel Ahmed
  • 638
  • 7
  • 24
5
votes
1 answer

How to avoid cairo drawing xlib surface from flickering?

I'm doing some programming with cairo and xlib in C++, my code is listed below. I had some flickering issues but by modifying my code, it seems works good now generally. But when the window is resized at a small size (about 600x450 on my laptop), it…
byhc
  • 173
  • 8
5
votes
2 answers

How to create a game loop with xlib

I am trying to create a game loop for an xlib window, but I cannot manage to paint the window correctly. Right now I am creating a window with XCreateSimpleWindow(...), and using a for loop to paint all pixels one at a time. (The color of these…
JeroenD
  • 343
  • 1
  • 6
  • 16
5
votes
2 answers

X11 - Xrandr giving me false monitors

I was trying to find all monitors and their coordinates (width w, height h, x origin/top-left-most x, and y origin/top-left-most y) and was using this code, it works good on some systems. But on other systems I get false and duplicate entries. Would…
yatg
  • 1,121
  • 1
  • 9
  • 15
5
votes
0 answers

Create a click through window for Linux

I want to make a click through window. A window which I click but the click pass to the window below it. I've found this two solutions for windows: How to make click-through windows PyQt I have a form that can "click through", i.e. direct clicks…
5
votes
1 answer

Making a window a desktop in XLib/Qt

I am trying to write a simple program to act as my desktop background in Qt, I have made it all work fine apart from making it a Desktop Widget. I have no idea on how to do this, I don't mind using XLib or Qt for doing this, but if anyone has some…
Tom Leese
  • 19,309
  • 12
  • 45
  • 70
5
votes
0 answers

Qt/X11: How to make a QWidget override-redirect / calling XChangeWindowAttributes() with QWidget

Does anybody has an example how to make a QWidget instance (as toplevel window) override-redirect with the X11 library? the following code doesn't work: QWidget* widget = new QWidget(); XSetWindowAttributes attr; …
Frime
  • 261
  • 2
  • 6
5
votes
1 answer

Resolve union structure in Rust FFI

I have problem with resolving c-union structure XEvent. I'm experimenting with Xlib and X Record Extension in Rust. I'm generate ffi-bindings with rust-bindgen. All code hosted on github alxkolm/rust-xlib-record. Trouble happen on line…
alxkolm
  • 1,911
  • 2
  • 14
  • 11
5
votes
2 answers

Query XSettings Manager for Icon Theme

I'm writing an Application in Vala (a c compatible language) for which I need the icon theme that is currently set. I want to avoid having GTK+ or Qt as an dependency. I know that GTK+ 3 has a settings.ini and GTK+ 2 has a .gtkrc-2.0 file, but…
Ansgar
  • 371
  • 3
  • 15