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

How to observe changes in connected monitors via Xlib?

I'm trying to write a program that would detect external monitors being plugged in and automatically enable and configure them through Xlib. I know that there is XRandr extension that allows this. My question is, how do I enable receiving XRandr…
kyku
  • 5,892
  • 4
  • 43
  • 51
5
votes
1 answer

Drawing window border in Python xlib

I'm working on a window manager written using python's xlib bindings and I'm (initially) attempting to mimic dwm's behavior in a more pythonic way. I've gotten much of what I need, but I'm having trouble using X's built in window border…
bbenne10
  • 1,447
  • 14
  • 23
5
votes
2 answers

How do I simulate mouse clicks with Xlib on Python

For educational purposes I've set out to write a python script using cwiid and Xlib so that I can use my wiimote like a mouse. So far I've gotten the cursor to move by calling disp.warp_pointer(dx,dy) then calling disp.sync() every set time…
math4tots
  • 8,540
  • 14
  • 58
  • 95
4
votes
1 answer

XLib Window Name Problems

since 4 days, I try to see how XLib works, and I have finally understood that. Si I tried to make a short program wich retrieve open window's name. For that, I created 2 functions : Window *list (Display *disp, unsigned long *len) { Atom prop =…
ex0ns
  • 1,116
  • 8
  • 19
4
votes
1 answer

XLib: How do I return to windowed mode once I make it full screen?

I was able to make my app go full screen, but I can't make it go back to the windowed mode with borders visible. I tried to call XDeleteProperty to clear out the settings for full screen but it doesn't seem to work.
JosephH
  • 8,465
  • 4
  • 34
  • 62
4
votes
1 answer

Explanation of Header Pixel in GIMP created C Header File of an XPM image

In GIMP, you're able to save an image as a C header file. I did so with an XPM file, which looks like the image below: If I were to save the XPM image as a C header file, GIMP will output this C header file. In order to process each pixel of the…
SpeedBurner
  • 711
  • 2
  • 9
  • 18
4
votes
1 answer

How does compositor work on X?

I am trying to understand how compositors work on X (well basically because neither xcompmgr nor cairo-compmgr can draw shadow properly for my awesome wm~~~) I have read part of the source code both xcompmgr and cairo-compmgr but I still don't…
yuyichao
  • 768
  • 6
  • 28
4
votes
3 answers

CBM image file format: what is it? how to read it?

I have a collection of images in the CBM file format. What is this format? How to read it? How to convert it to, say, a BMP bitmap? Searching the net, I found that it could mean one of those three things: 1) Fuzzy Bitmap, as per Michael Mauldin's…
Hugues Fontenelle
  • 5,275
  • 2
  • 29
  • 44
4
votes
1 answer

Handle "new top level window" events in Xlib/Xt

So I'm in a situation where I need to know when a top level window gets created. I'm working at the Xlib/Xt level and on a Window Manager that doesn't support the EWMH specification. My idea is to hook into the root window's SubstructureNotify…
Daniel Jennings
  • 6,304
  • 3
  • 32
  • 42
4
votes
1 answer

Click through transparent window in Xlib

I would like to be able to draw anywhere on the screen, so I think I should create a transparent, fullscreen, undecorated window. The problem is, all events pass through the window. I'd like to catch a mouse-move event and use it. Any ideas? Might…
Zack Michener
  • 53
  • 1
  • 8
4
votes
1 answer

Load image onto a window using xlib

I've created window class and i want to insert an image as a background of that window. File formats need to be png. I used XImage of magick++ to load an image. but don't know how to make its as a background of my window. Any idea how to do it?
HariHaraSudhan
  • 1,330
  • 3
  • 15
  • 24
4
votes
3 answers

Enable antialiasing using Xlib

I'm trying to develop a custom set of libraries for creating GUIs in Linux, with, you know, widgets, buttons, etc. So I'm now learning to creating user interfaces using X11 and its Xlib. I get to the point of having a nice window of a size…
Francesco Boffa
  • 1,402
  • 1
  • 19
  • 35
4
votes
0 answers

Create a System Tray Icon in Linux without GTK/QT

I need to create a Tray Icon for my application using purely the Xlib. After some searching, reading the XEmbed documentation and some stuff on SO, this is what the code looks like so far (mostly copy & paste). I understand what it does, but not…
Nidhoegger
  • 4,973
  • 4
  • 36
  • 81
4
votes
1 answer

Block Keyboard but get global Hotkeys XLib

[SOLVED - Provided example contains the answer!] I am trying to implement a program which is started in fullscreen and does not allow any userinput (wether mouse nor keyboard) because it just reacts on UDEV-Signals, when a usb-stick or cd is…
ryyppy
  • 442
  • 3
  • 10
4
votes
1 answer

How to change X window Properties

I am using gdm and my goal is to disable user interaction on a specific X window id. I have tried to change many X-win properties like WM_PROTOCOLS, WM_HINTS, _NET_WM_ALLOWED_ACTIONS using xprop. Although, I was successful to change the properties…
Anil Bisht
  • 55
  • 1
  • 6