mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Improve error handling in C++ Skia Renderer API
- Don't try to create a GLX context when we only have an XCB window handle, XLib is required for that. - Make it possible to create a NativeWindowHandle from Xlib data types. Fixes #2978
This commit is contained in:
parent
57e9b5b796
commit
3565023a15
4 changed files with 37 additions and 8 deletions
|
@ -45,7 +45,7 @@ static slint_platform::NativeWindowHandle window_handle_for_qt_window(QWindow *w
|
|||
native->nativeResourceForWindow(QByteArray("connection"), window));
|
||||
auto screen = quintptr(native->nativeResourceForWindow(QByteArray("screen"), window));
|
||||
|
||||
return slint_platform::NativeWindowHandle::from_x11(wid, wid, connection, screen);
|
||||
return slint_platform::NativeWindowHandle::from_x11_xcb(wid, wid, connection, screen);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,7 @@ class MyWindow : public QWindow, public slint_platform::WindowAdapter
|
|||
public:
|
||||
MyWindow(QWindow *parentWindow = nullptr) : QWindow(parentWindow)
|
||||
{
|
||||
resize(640, 480);
|
||||
m_renderer.emplace(window_handle_for_qt_window(this), physical_size());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue