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

Best container for coordinates

I'm currently trying to pick up coordinates from a txt file in use of xlib and I've been wondering what's the best container to use for such an endeavor? I was thinking multidimensional arrays since my program is going to work with triangles and a…
Marorin
  • 167
  • 3
  • 12
4
votes
1 answer

Making sound with different frequencies

Is there a function in X11 or built into Linux that can produce a Beep sound with different frequencies? Some function like the Beep(dwFreq, dwDuration) function in Windows which has arguments that allows for the specification of frequency in hertz…
Minimus Heximus
  • 2,683
  • 3
  • 25
  • 50
4
votes
2 answers

Xlib difference between _NET_ACTIVE_WINDOW and XGetInputFocus

What's the difference between _NET_ACTIVE_WINDOW and XGetInputFocus() ? Do they always point to the same window? When use one over the other? Thanks.
user519179
4
votes
1 answer

X11 modal dialog

How can I create a modal dialog in X11 using Xlib? A modal dialog is a a window that stays on top of other windows of the app (like transient windows do) and also refuses to give focus to other windows of the app. In Windows, modality is also…
user519179
4
votes
2 answers

X11 non-clipped child windows

Does X have the notion of non-clipped child windows? The behavior in Windows and OSX for these is: the parent always stays behind its children the children are closed automatically when the parent is closed the children follow the parent when…
user519179
4
votes
1 answer

How to get inner and outer window dimensions with Xlib/XCB?

Is there a reliable way to get the inner and outer rectangle of a top level window with XCB/Xlib? (IOW frame and client rectangle). Here's what I tried: xcb_get_geometry always returns the initial dimensions even after the window gets resized (what…
user519179
4
votes
1 answer

Xlib XGetWindowProperty Zero items returned

I have problems reading some XWindow ICCCM Properties. The problem actually is when i try to read _NET_WM_STATUS property. The function i'm using is: int get_property_value(Display* display, Window window,char *propname, long max_length, …
Ivan
  • 4,186
  • 5
  • 39
  • 72
4
votes
1 answer

retrieve physical screen size

Xorg starts and creates a virtual screen Virtual screen size determined to be 3120 x 1050 spanning my 2 physical screens of 1680x1050 and 1440x900, using xinerama I guess. There is no configuation file and I don't want to change the system…
annoyed
  • 51
  • 4
4
votes
0 answers

Xlib: Move Window Outside of Desktop Bounds

Is it possible to move an X11 window outside of the desktop using xlib? For example I want to position a window at -300, -300 and do so using the XMoveWindow function. XMoveWindow( dpy, win, -300, -300 ); So the desired result would be something…
David Saxon
  • 1,406
  • 1
  • 12
  • 23
4
votes
2 answers

How to break xlib's next_event()?

I am using QThread (pyside) for handling global hot-keys on X11. I have some simple while loop which looks like: while self.doRun: event=root.display.next_event() if event.type==X.KeyPress: .... But next_event() is…
middleofdreams
  • 353
  • 3
  • 13
4
votes
1 answer

How to load windows cursors (.cur) in Linux using XLib and Xcursors?

I'm trying to load a .cur file via Xcursor library and i just can't make it work. I'm working with linux (Bodhi + Lubuntu) on virtualbox. Here's my code: my includes // GLFW #define GLFW_DLL // use the GLFW .dll #include…
user1299518
4
votes
1 answer

What does screen number and display number mean in Xlib?

For example, the foobar:0.1 would specify screen 1 of display 0 on the machine named foobar. But what does screen number and display number of X server mean in Xlib? Does it mean that an X server can have many displays, and a display can have many…
Kevin Dong
  • 5,001
  • 9
  • 29
  • 62
4
votes
1 answer

C - Xlib - BadWindow Error using XGetWindowProperty for window title

I want to get a list of all open windows' titles using Xlib in C. I am running Ubuntu 12.04. I am using the following code to accomplish this: #include #include #include #include Window *list(Display…
Jack O'Connor
  • 185
  • 1
  • 4
  • 11
4
votes
2 answers

How to open a non-decorated fullscreen window on Ubuntu

What is the trick to open a non-decorated fullscreen window on Ubuntu? I used to change the _NET_WM_STATE property to _NET_WM_STATE_FULLSCREEN to achieve this but while working fine on KDE it doesn't seem to work on Ubuntu (GNOME; tested with 12.04…
Andreas
  • 9,245
  • 9
  • 49
  • 97
4
votes
2 answers

How to “correctly” detect application name when changing focus event occurs with python xlib

I want to detect applications window name when changing focus event occurs with python xlib, so in the first step I use this code: #!/usr/bin/env python #-*- coding:utf-8 -*- import Xlib.display import time display = Xlib.display.Display() while…
PathSeeker
  • 101
  • 1
  • 9