'Why can't I embed a Xephyr instance into a Qt window?
I am trying to get a Xephyr window opened within a Qt window of mine, but can't get it to work properly.
I am running a blank Qt application, for testing purpose, like this:
#include <QApplication>
#include <QWidget>
#include <iostream>
int main(int argc, char** argv) {
QApplication a(argc, argv);
QWidget window;
std::cout << window.winId() << std::endl;
window.resize(100, 100);
window.show();
return a.exec();
}
and compiling with g++ $(pkg-config --cflags --libs Qt5Widgets) test.cc
Then I get some window id after running the program. This time I got 104857606
Next, I use the Xephyr command Xephyr -parent 104857606 -screen 100x100 :1.
Here is the error I get when using it:
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Could not resolve keysym XF86EmojiPicker
Errors from xkbcomp are not fatal to the X server
(EE)
Fatal server error:
(EE) X11 error
Error code: 8
Sequence number: 5
Major code: 1 Minor code: 0
Error value: 104857606
(EE)
I know this is an example of a BadMatch error, but I can't find out how to fix this. Even without the -screen 100x100, I can't get this program to work.
How can I get a Xephyr window into Qt if the -parent option doesn't work-- or how can I get this option to work?
I am using Arch Linux if that changes anything.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
