1,086 questions
2
votes
0
answers
104
views
`XOpenIM` failing because of `XSetLocaleModifiers`?
I'm just trying to open an input method:
#include <stdio.h>
#include <X11/Xlib.h>
int main() {
Display *display = XOpenDisplay(nullptr);
XSetLocaleModifiers("");
...
1
vote
1
answer
101
views
Cairo rendering to Xlib surface paints garbage in transparency?
I'm trying to render a basic image to a window with Cairo. I set up the window, then paint the image to it as I normally would:
#include <threads.h>
#include <time.h>
#include <X11/...
0
votes
3
answers
161
views
How do I properly implement scrolling?
The only thing I could find online about scrolling is that Xlib gives you scrolling events as regular XButtonEvents (since, you know, we obviously need to track both scroll button presses and releases)...
0
votes
2
answers
89
views
How to stop Cairo/X11 from flickering when resizing?
I'm trying to make a GUI app with Cairo, but whenever I resize the main window specifically inward, the background colour flickers in for a frame. There's a similar question about this, How to avoid ...
Advice
1
vote
2
replies
165
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
69
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
523
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
74
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
78
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
132
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
336
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
111
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(...
2
votes
2
answers
404
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
55
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
88
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 ...