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

Fatal IO error 0 (Success) on X server

What does the error "Fatal IO error 0 (Success) on X server" mean? The error is produced when an X client tries to call XvCreateImage(), and it results in the client terminating. X.0.log shows the following version information: X.Org X Server…
Ori Pessach
  • 6,777
  • 6
  • 36
  • 51
7
votes
1 answer

Xlib: Closing window always causes fatal IO error?

I'm not sure why this happens, but any window I create using Xlib in C++ gives outputs an error to the terminal when I try to close is using the X button. I can close it programmatically with no errors, it's just the X button that does it. The…
NmdMystery
  • 2,778
  • 3
  • 32
  • 60
7
votes
3 answers

Borderless windows on Linux

Is their a standard way to make a particular window borderless on Linux? I believe that the window border is drawn by your window manager, so it may be that I just need to use a particular window manager (that would be find, I'd just need to know…
dicroce
  • 45,396
  • 28
  • 101
  • 140
7
votes
1 answer

How can I move/resize a window using python-xlib?

How can I resize/move a window using python-xlib? I have the X window ID. What's the equivalent python-xlib snippet to wmctrl -i -r $id -e $gravity,$x,$y,$width,$height?
Daenyth
  • 35,856
  • 13
  • 85
  • 124
6
votes
1 answer

XLib, XTestFakeKeyEvent latences

I try to send key to an application with XLib and XTestFakeKeyEvent, and it works fine, with the following code : XSetInputFocus(disp, list[selectWindow],RevertToPointerRoot,CurrentTime); for(i=0;i
ex0ns
  • 1,116
  • 8
  • 19
6
votes
1 answer

How to Detect when entering a password field

I am currently trying to debug an issue I've been experiencing with the program 'matchbox-keyboard'(http://matchbox-project.org/), and I'm hoping for some assistance. matchbox-keyboard is an on-screen keyboard that I am currently using in a…
Andrew
  • 103
  • 1
  • 8
6
votes
2 answers

X11 Fullscreen window (OpenGL)

I'm writing and OpenGL application on linux (Ubuntu 11.10) using Xlib (X11). What is the simplest way to implement toggle between windowed and fullscreen mode?
runnydead
  • 618
  • 1
  • 7
  • 17
6
votes
1 answer

pygtk window with box that ignores all X(mouse)events (passes them through)

I'd like to do the following: Create a fullscreen, always on top pygtk window with a webkit widget displaying some html, but with a box that is completely transparent, so that the windows below are visible. (This seems to be possible: Is it possible…
Rumex
  • 165
  • 6
6
votes
2 answers

minimize fullscreen Xlib OpenGL Window

I'm currently trying to enable alt-tabbing out of my fullscreen Xlib OpenGL window, but am having some difficulties. I've tried XUnmapWindow(..), which kindof works, but the resolution does not reset (unless I should be doing that manually?) and my…
Jarrett
  • 1,767
  • 25
  • 47
6
votes
2 answers

Embed an app into a window

FvwmButtons (a module of fvwm window manager) has the Swallow function, that embeds the window of an application into a panel. I have to do something like this with Motif and Xlib. I want to embed an Xclock into my application. I guess I have to…
mghis
  • 517
  • 1
  • 5
  • 14
6
votes
1 answer

Get scancode rather than keycode on Linux using X11

I'm trying to listen to keyboard input (using an X11 event loop) and get scancodes. These scancodes should refer to the physical location of a key, rather than the character it types. The problem is, all I can get are KeySyms and KeyCodes, which are…
ComfyS
  • 131
  • 1
  • 5
6
votes
1 answer

Python Xlib.error.BadAccess on attempting to access X11 shortkeys

I'm trying to catch shortkeys (e.g. Ctrl Alt direction key) in a Python script running in the background. When I try to do this, I'm encountering errors. My code is as follows: import Xlib import Xlib.display def process_event(event): keycode…
d3pd
  • 7,935
  • 24
  • 76
  • 127
6
votes
0 answers

Perfomance of (XGetImage + XPutImage) VS XCopyArea VS (XShmGetImage + XShmPutImage) VS GTK+

I'm new not only to Xlib but to Linux interface programing as well. I'm trying to solve common task(which is not so common as it seems to be, as I can't find any reliable example) of drawing content of one window into another. However I've faced…
6
votes
1 answer

How to restore a window with Xlib?

I've managed to iconify a window using XIconifyWindow, but haven't managed to later restore it. I tried the following: XMapRaised (display, window); And: XMapWindow (display, window); And: XClientMessageEvent ev; std::memset (&ev, 0, sizeof…
Yaron Cohen-Tal
  • 2,005
  • 1
  • 15
  • 26
6
votes
1 answer

How can I use python xlib to generate a single keypress?

I want to make a very simple python 3 script that will generate a single keypress (F15). I don't want to use a bunch of libraries to do this as I only need one key to be pressed and don't need support for the whole keyboard. I know I need to use…
Dolores
  • 323
  • 1
  • 12