1,082 questions
Advice
0
votes
2
replies
65
views
How CLIPBOARD Selection and Atoms works in X11/XLib?
I am trying to understand how actually selections work in X11, like Primary and Clipboard selections.
This question will have multiple questions inside it so I am sorry.
I did my own research and ...
2
votes
1
answer
55
views
Xlib background pixmap is reversed
I have a bitmap that I'm using for the background of a window in Xlib, but the pattern appears to be reversed (mirrored). The "shadow" should be in the upper-left of each square, but is ...
9
votes
1
answer
485
views
Getting notified when X11 window is minimized and restored
How can I get notified when the user minimizes or restores my X11 window? On very old Linux versions I could check for the UnmapNotify message to learn when the window is minimized and MapNotify when ...
3
votes
1
answer
69
views
How do you make XbaeMatrix widget non editable
I am trying to use XbaeMatrix to display tabular/matrix data but I do not want the cells to be editable.
I can not find how to achieve that.
This is what I have tried:
/*
* xbae_example.c
* Minimal ...
2
votes
0
answers
69
views
How to display a label as message window in Motif MainWindow
I want to use the Motif MainWindow using:
A container as work region
A label as message window.
But the label is not shown.
My expectation is that it would be shown below the container (work region)....
1
vote
1
answer
115
views
How can I get global keystrokes without eating all the keys?
I have a basic input grabber which looks like this:
Display *display = NULL;
int main(const int argc, const char *argv[]) {
display = XOpenDisplay(NULL);
if (!display) {
return 1;
...
1
vote
1
answer
163
views
Why is eglCreateContext() giving me EGL_BAD_ALLOC?
Preface: I'm aware fixed-function OpenGL is obsolete, I'm just using it for fun and learning.
I'm trying to set up a classic fixed-function OpenGL context with Xlib and EGL. However, I'm getting ...
0
votes
1
answer
109
views
How to interact with keyboard during simulation? [closed]
I am having trouble getting the keyboard to function during my simulation program.
My code that doesn't work:
int running = 1;
while (running) {
// Process all pending X events
while (XPending(...
3
votes
2
answers
274
views
How do I convert an X11 keycode to a Unicode character in C?
I need to convert keycodes in X11 to symbols in another system. There's an easy function to convert Unicode characters to symbols for that system, so all I need to do for most keycodes is convert into ...
1
vote
0
answers
54
views
I am passing a window ID to a script that returns the window's icon, but it returns None when imported and used
I have been working on a window manager and was able to get the icon from a X window via its ID. This script properly returns a Pillow Image object that I can use to get the icon of a window. However, ...
1
vote
0
answers
79
views
How do I get icon of window as PNG using python xlib?
I am working on a window manager made in Python 3 using python-xlib. When I tried to implement displaying the icons (as a PNG) on a window as a 16x16 image, it worked with this dummy image, but when I ...
3
votes
2
answers
100
views
How would I render an image using python-xlib?
I am trying to make a window manager in python 3 and I need to find out how to render 16x16 window icons.
I have used Pillow and Xlib to render a dummy image, and I was expecting that it would work, ...
1
vote
1
answer
99
views
I don't understand the return code value of xlib `XGrabKey()` function
Context
I'm newbie with X11 protocol, and I want to use it in a Rust application, in order to listen to global key events (mainly by using XGrabKey() in a way or another).
Initially I started with ...
6
votes
0
answers
238
views
How to draw rounded rectangle in X11
I'm trying to draw a rounded rectangle in X11 using the following:
#include <X11/Xlib.h>
#include <stdlib.h>
int main() {
Display *display;
Window window;
GC gc;
XEvent ...
2
votes
1
answer
116
views
Managing window title buttons in Linux via X11 API [duplicate]
Currently I am trying to make a sort of distro-independent message box (similar to all those modal popup windows, but which can work without the explicitly specified parent window) for Linux, which ...