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

Xlib How Does This (Removing Window Decoration) Work?

How does the following code remove window borders? //note the struct is declared elsewhere, is here just for clarity. //code is from [http://tonyobryan.com/index.php?article=9][1] typedef struct Hints { unsigned long flags; unsigned long …
Ell
  • 4,238
  • 6
  • 34
  • 60
17
votes
2 answers

How do you install Python Xlib with pip?

"Python Xlib" (http://pypi.python.org/pypi/Python%20Xlib) is a low level python library for working with xlib. I have installed it on my Ubuntu Linux machine via apt, i.e. sudo aptitude install python-xlib. However is it possible to install it with…
Amandasaurus
  • 58,203
  • 71
  • 188
  • 248
16
votes
2 answers

Undefined reference to XOpenDisplay in a Qt project

Now I am feeling quite stupid. I am trying to do some stuff with xlib in Qt Creator. My code: #include #include int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); Display *display =…
David Polák
  • 1,581
  • 4
  • 18
  • 33
16
votes
2 answers

How to upload 32 bit image to server-side pixmap

I'm trying to create server-side RGBA pixmap from client side buffer. CreatePixmap & CreateImage work ok for 32 and 24 bit, but XPutImage result in Match Error returned by server X Error of failed request: BadMatch (invalid parameter attributes) …
Andrey Sidorov
  • 24,905
  • 4
  • 62
  • 75
14
votes
4 answers

Listening to keyboard events without trapping them?

I'm writing an command-line application which listens for Control key release events in X Windows and alerts another process when it detects them. Being new to GNU/Linux, I'd prefer avoiding to fumble with GCC and therefore I'm looking for a…
14
votes
5 answers

How to fix error Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'No protocol specified\n'

I'm making some program with python3 and XLib. On my PC with Ubuntu 14.04 everything works fine but when I try to run my app in my notebook with manualy installed Xorg I get exception: Xlib.error.DisplayConnectionError: Can't connect to display…
BPS
  • 1,133
  • 1
  • 17
  • 38
14
votes
1 answer

X11: How do I REALLY grab the mouse pointer?

I've implemented a horizontal splitter widget in Xlib. I'm trying to grab the mouse when the user clicks & drags on the splitter bar (so that the user can dynamically move the split & thus resize the windows on either side of the splitter…
Drew Hall
  • 28,429
  • 12
  • 61
  • 81
14
votes
4 answers

Listening to keyboard events without consuming them in X11 - Keyboard hooking

I tried to write a program which hooks keyboard messages to pronounce the name of each key whenever it is pressed in Ubuntu (KDE); without interfering with normal action of keyboard in programs (just announcing the key name). This is my…
Minimus Heximus
  • 2,683
  • 3
  • 25
  • 50
14
votes
5 answers

Click through transparent xlib windows

I have a transparent, watermark like application that is written with XLib in C. Currently if you click anywhere on the application nothing happens but I would like it to pass mouse input to whatever is below it. e.g. If you click the X to close a…
Corey
  • 161
  • 1
  • 7
13
votes
2 answers

OpenGL GLX extension not supported

I had installed OpenGL and freeglut in Ubuntu 10.04 and it worked fine in 10.04 and 10.10. But after I upgraded to 11.04, the applications I've developed using OpenGL is not running properly. They're compiling without errors, but when I try to…
SparrowG
  • 221
  • 1
  • 4
  • 13
13
votes
2 answers

Hanging of XShmPutImage event notification

I am using XShm extension to draw and manipulate images in Linux. In order to not have screen flickering, I am passing send_event = TRUE to XShmPutImage and then waiting for the event with XIfEvent, immediately after the call to XScmPutImage. This…
johnfound
  • 6,857
  • 4
  • 31
  • 60
13
votes
1 answer

what is a color map and when do I need one?

Is there any general concept or definition of what is a "color map" within computer graphics? You sometimes stumble upon this term in some libraries - so may I assume that color maps intend to have a specific functionality and purpose? What exactly…
k t
  • 343
  • 5
  • 15
13
votes
3 answers

How to identify top-level X11 windows using xlib?

I'm trying to get a list of all top level desktop windows in an X11 session. Basically, I want to get a list of all windows that are shown in the window managers application-switching UI (commonly opened when the user presses ALT+TAB). I've never…
Thomi
  • 11,647
  • 13
  • 72
  • 110
11
votes
1 answer

Empty or transparent window with Xlib showing border lines only

Is there a way to create a window with Xlib which only display the border lines, title, close button and that you can move with the mouse? The content of the window must be empty (or "totally transparent", although "transparency" sounds more like an…
Martin
  • 9,089
  • 11
  • 52
  • 87
10
votes
2 answers

Xlib center window

I am writing a Xlib app where I want the window to be centered. I have used XMoveWindow with (desktopWidth - width) / 2, (desktopHeight - height) / 2 and it is roughly in the right place. However the problem is that width and height are the client…
Programmdude
  • 551
  • 5
  • 22
1
2
3
68 69