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
4
votes
1 answer

Why I set xlib window background transparent failed?

I use the following code to get a transparent window, but it returns black.What's wrong with me? And, can anybody give me a simple example to create a window with transparent background?THANKS! #include #include int…
lidedongsn
  • 125
  • 2
  • 12
4
votes
3 answers

x11/xlib with microsoft visual c++

I copy-past this code from Wikipedia: http://en.wikipedia.org/wiki/Xlib And I'm getting this error: fatal error C1083: Cannot open include file: 'X11/Xlib.h': No such file or directory I assume it works for c++ even the though the code is c, or at…
Alice
  • 701
  • 1
  • 5
  • 17
4
votes
2 answers

Close XLib application from another process

I have a Xlib-based program with an event loop that uses XNextEvent to receive and process relevant events. I would like to be able to gracefully close this program from another process (actually from a shell script). I need to do some cleanup when…
Grodriguez
  • 21,501
  • 10
  • 63
  • 107
4
votes
1 answer

XChangeProperty for an atom property on a system where Atom is 64 bits

The X11 protocol defines an atom as a 32-bit integer, but on my system, the Atom type in is a typedef for unsigned long, which is a 64-bit integer. The manual for Xlib says that property types have a maximum size of 32 bits. There seems to be some…
user813022
4
votes
2 answers

is clipboard implemented by xlib or to be implemented by individual applications

ICCCM defined three selections 1)primary 2)secondary 3)clipboard. But in the xlib, xatom.h had defined only XA_PRIMARY and XA_SECONDARY but clipboard has no such atom. So my doubt is whether clipboard is implemented by xlib or has to be implemented…
santosh kumar
  • 131
  • 2
  • 7
4
votes
2 answers

Change Alpha value of pixels in Xlib window

I am going through (Change Xlib window background color with C++) & know to set the background color of XWindow. But how can I set the Alpha value of that Xwindow. I tried several things, but when I do read from XWindow, each pixel has Alpha as…
user1409528
  • 123
  • 2
  • 7
4
votes
1 answer

When do I have to call XInitThreads?

I understand that if there are two or more threads sharing a single X display connection, XInitThreads must be called before any other Xlib call. But what if every thread has its own connection to the display and operates only on that connection? Is…
hpsMouse
  • 2,004
  • 15
  • 20
4
votes
1 answer

how do I convert XLib keycode to microsoft virtual key?

How do I convert the X11 keycode to a microsoft virtual key code int processKeyboardMessage( XEvent *event ) { assert( KeyPress == event->type ); //TODO: Before returning convert keycode into microsoft virtual key code return (…
JonnyRo
  • 1,844
  • 1
  • 14
  • 20
4
votes
1 answer

NV-GLX missing extension in OS X Lion

I connect to a remote linux machine using "ssh -X machine", and then I run a graphical application, so its window is displayed on my local OS X Lion machine using X Window. I get the error "Xlib: extension "NV-GLX" missing on display…
Open the way
  • 26,225
  • 51
  • 142
  • 196
4
votes
2 answers

How to interpret the field 'data' of an XImage

I am trying to understand how the data obtained from XGetImage is disposed in memory: XImage img = XGetImage(display, root, 0, 0, width, height, AllPlanes, ZPixmap); Now suppose I want to decompose each pixel value in red, blue, green channels. How…
Martin
  • 9,089
  • 11
  • 52
  • 87
4
votes
1 answer

Detect running screensaver with xlib

I'm trying to detect wether a screensaver is running or not. Here's the code that I've got so far: /* LDFLAGS='-L/usr/X11R6/lib/ -lX11 -lXext -lXss' make xidle */ #include #include #include #include…
knopwob
  • 61
  • 6
4
votes
2 answers

Using GTK and Xlib in Python

I am writing some code where I need to drop down from GTK+ to Xlib. Specifically, I would like to set the icon of a toplevel window to be a window itself, rather than a pixmap, in order to write a GTK+ Window Maker dockapp. I got this to work in C…
profzoom
  • 297
  • 1
  • 2
  • 10
4
votes
0 answers

Python Xlib - Xlib.error.BadAccess on root.display.next_event()

Hey I've only really started Python and I decided to make program that catches certain keys, I found source online that captures mouseclicks and decided to start off with that, this is the code: import Xlib import Xlib.display display =…
miles
  • 53
  • 2
4
votes
0 answers

Gtk+ delayed white screen (flash plugin + NPAPI)

I created an standalone application which run compiled flash (.swf) on a gtk+ UI with NPAPI. When my video runs, there's a small time where there's a white screen (maybe 1 or 2 sec). It's kind of annoying and I am wondering if I can do something to…
fneron
  • 1,057
  • 3
  • 15
  • 39
4
votes
2 answers

Clipboard selection transfer does not work

I have been porting my system to X11 and I have a problem with clipboard copy (paste is already working). I have followed this. After a while I noticed that his example does not work too. Problem is when I try to paste it to somewhere, instead of…
Cem Kalyoncu
  • 14,120
  • 4
  • 40
  • 62