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
10
votes
5 answers

Why Do I get Xcode 1.5 not supported?

I am trying to install Cairo/Xlib on macOS I couldn't get this to work cmake -G "Xcode" --config Debug "-DCMAKE_BUILD_TYPE=Debug" ../. CMake Error: Xcode 1.5 not supported. CMake Error: Could not create named generator Xcode Generators *…
Necati Yesil
  • 143
  • 1
  • 5
10
votes
2 answers

How do I detect the currently focused application?

I'd like to be able to track which application is currently focused on my X11 display from Python. The intent is to tie it into a timetracking tool so that I can keep track of how much time I spend being unproductive. I already found this code at…
Soren
  • 753
  • 6
  • 11
10
votes
1 answer

What is the difference between XYPixmap, ZPixmap, XImage, XShmImage and Bitmap in X?

The only fact I know is that XImage is stored on the client side and the pixmaps are stored on the server side. Is it so simple? Then what is XY and Z Pixmaps and why X needs so many types of image formats? Why there is no XY and Z Images? And…
johnfound
  • 6,857
  • 4
  • 31
  • 60
10
votes
3 answers

How to efficiently draw framebuffer content?

I need to display RAM-based framebuffer for a virtual GPU device that doesn't have real display connected to it. What I have is mmap'ed chunk of memory after DRM_IOCTL_MODE_MAP_DUMB in RGB32 format. Currently I'm using MIT-SHM shared pixmap created…
user708549
10
votes
2 answers

Equivalent of "Invalidate Rect" / "WM_PAINT" in X11

I'm Porting some code from Windows to XLib. In the windows code, I can force a redraw by calling InvalidateRect and then handling the corresponding WM_PAINT message. However, I am having trouble finding out how to do this in X11/XLib. I see there…
default
  • 2,637
  • 21
  • 44
10
votes
1 answer

How do I use the xlib and OpenGL modules together with python?

I know it is possible to use Xlib and OpenGL together, with GLX (I've done it myself in C). The problem is, how do I do this in python? The OpenGL module has GLX functionality [documentation], but it appears to be using C types and I have no idea…
Michael Rawson
  • 1,905
  • 1
  • 15
  • 25
10
votes
0 answers

Looking for an OSD supporting align attribute, multiple span or div elements, multiple columns

Please let me know if there is an OSD on-screen-display program or techinque for Xorg/Linux platform which can render XML in a much richer way than pango, at least support align attribute, and multiple span or div elements, so it can display…
Sharad
  • 437
  • 1
  • 5
  • 17
9
votes
2 answers

What is the fastest way to display an image in QT on X11 without OpenGL?

I need to display a raw image in a QT widget. I'm running X11 on a framebuffer, so OpenGL is not available. Both the image and the framebuffer are in the same format - RGB565, but I can change it to any other format if needed. I don't need blending…
msh
  • 2,700
  • 1
  • 17
  • 23
9
votes
1 answer

How to get Gdk window from xid?

I'm lost in version 3.. in python2+gdk2 is: #!/usr/bin/env python2 import gtk gtk.gdk.window_process_all_updates() window_xid = 54525964 gdk_window = gtk.gdk.window_foreign_new(window_xid) which is pretty much straight forward. But then, the…
demula
  • 1,214
  • 2
  • 9
  • 12
9
votes
3 answers

Is Xlib Still Used?

Is xlib still used? The helpful documentation I can find is http://tronche.com/ which looks, to me, very outdated. Who uses Xlib? Is GTK+ and QT built on it? thanks in advance, ell.
Ell
  • 4,238
  • 6
  • 34
  • 60
9
votes
2 answers

How to create semi transparent white window in XLib

I would like to create a semi transparent white window in XLib, but the window is not semi translucent, it remains fully opaque. I use the compton compositor and there are transparent windows in the system, so the problem is in the code: #include…
jsr
  • 103
  • 1
  • 5
9
votes
1 answer

drop/rewrite/generate keyboard events under Linux

I would like to hook into, intercept, and generate keyboard (make/break) events under Linux before they get delivered to any application. More precisely, I want to detect patterns in the key event stream and be able to discard/insert events into the…
Heron
  • 211
  • 3
  • 8
9
votes
1 answer

Program with graphics being aborted, even though XInitThreads was called

I have just started using Graphics in C, and I encountered this error while running a simple program that draws concentric circles: user@user:~/Documents/C$ gcc circle.c -lX11 -lgraph user@user:~/Documents/C$ ./a.out [xcb] Unknown sequence number…
sobol
  • 191
  • 1
  • 1
  • 7
9
votes
3 answers

Python: Xlib -- How can I raise(bring to top) windows?

I've tried using: win.configure(stack_mode=X.TopIf) win.set_input_focus(X.RevertToParent, X.CurrentTime) However even without any focus loss prevention on my window manager this does not work, does anyone know of another way to do this? Xlib…
peeeg
  • 91
  • 1
  • 3
9
votes
1 answer

Draw on top of the screen using xlib

I want to draw some primitives on top of all windows on the screen. I've found some code in C and tried to port it to use python's xlib: from Xlib.display import Display from Xlib import X from Xlib import protocol display = Display(':0') root =…
aplavin
  • 2,199
  • 5
  • 32
  • 53
1 2
3
68 69