Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for XCB #5

Closed
tomaka opened this issue Feb 27, 2016 · 15 comments · Fixed by #2825
Closed

Add support for XCB #5

tomaka opened this issue Feb 27, 2016 · 15 comments · Fixed by #2825
Labels
D - hard Likely harder than most tasks here DS - x11 H - help wanted Someone please save us P - low Nice to have S - enhancement Wouldn't this be the coolest?

Comments

@tomaka
Copy link
Contributor

tomaka commented Feb 27, 2016

No description provided.

@kvark
Copy link
Contributor

kvark commented May 3, 2016

Some machines don't support VK_KHR_xlib_surface but do support VK_KHR_xcb_surface, so this is a compatibility concern:

Instance Extensions     count = 3
        VK_KHR_surface                  : extension revision 25
        VK_KHR_xcb_surface              : extension revision  5
        VK_EXT_debug_report             : extension revision  2

@kvark
Copy link
Contributor

kvark commented May 11, 2016

Found this library as a potential workaround: https://github.com/Aatch/rust-xcb

@nicokoch
Copy link
Contributor

Just a heads up for anyone searching a workaround.

The intel linux driver does indeed support xlib, but it has to be enabled at compile time.
You can compile the vulkan driver yourself with VK_KHR_xlib_surface enabled by enabling
-DVK_USE_PLATFORM_XLIB_KHR.

For anyone using archlinux, I have submitted a feature request to their bug tracker (https://bugs.archlinux.org/task/50160). It looks like they are working on it (or at least are aware of the problem). For other distros, you can try submitting a bug report to their corresponding bug tracker.

@kvark
Copy link
Contributor

kvark commented Jul 27, 2016

Thanks for the info @nicokoch

@tomaka tomaka added the A-xcb label Nov 3, 2016
@mikedilger
Copy link
Contributor

mikedilger commented Feb 19, 2017

With xlib I'm experiencing (in vulkan) get_physical_device_surface_formats_khr() doesn't return until the window is focused. With xcb (in a separate C++ program - Sascha Willems demos) this doesn't happen, the window draws irrespective of focus. I can't be sure the reason for this behavioral difference is xlib vs xcb, but it is looking that way, in which case I prefer xcb and +1 this issue.

@francesca64
Copy link
Member

Is this still relevant?

@tomaka
Copy link
Contributor Author

tomaka commented Apr 10, 2018

This is still relevant, but not really a priority.

@francesca64 francesca64 added S - enhancement Wouldn't this be the coolest? D - hard Likely harder than most tasks here P - low Nice to have C - waiting on author Waiting for a response or another PR labels May 6, 2018
@mikedilger
Copy link
Contributor

Just fyi:
https://crates.io/crates/ash exposes Vulkan's
https://docs.rs/ash/0.24.1/ash/vk/types/struct.XcbSurfaceCreateInfoKHR.html
which wants not only the connection (xcb_connection_t) but also the window (xcb_window_t). I notice that winit already provides the former with get_xcb_connection() but not the latter, so searching I found this issue and now I remember xcb isn't really supported yet.

@francesca64
Copy link
Member

I don't believe adding a full-fledged XCB backend to be a good idea until winit stabilizes more. We have enough of a struggle keeping the existing backends synchronized.

That said, are you sure that using the return of get_xlib_window as your xcb_window_t doesn't work? I'd imagine it would work.

@mikedilger
Copy link
Contributor

I did not know that get_xlib_window is the same for xcb. Thanks.

@goddessfreya goddessfreya added H - help wanted Someone please save us and removed C - waiting on author Waiting for a response or another PR labels Jul 22, 2019
chrisduerr pushed a commit to chrisduerr/winit that referenced this issue Feb 11, 2020
…iers

macos: Add a hook to update stale modifiers
@Avokadoen
Copy link

This seems to be the cause of a UnsupportedWindowHandle error for my Ubuntu station on a "HP Prodesk 600 Small Form Factor"

@rib
Copy link
Contributor

rib commented May 29, 2022

At least for reference it's probably worth linking this PR here which quietly includes a full port to xcb: #2088 :)

At least one notable concern is that a side effect of a full port to xcb (as opposed to more of a hybrid approach that just optimizes certain request sequences with xcb but keeps xlib for event processing) is that it would remove XIM based IME support.

XIM is arguable quite archaic and there should be better ways to support IMEs, like having direct support for ibus perhaps, but still something to consider.

@kchibisov
Copy link
Member

It won't and it'll likely fixed it. We can't support ibus directly, since it's, you know, ibus, and other IMEs won't work.

At least one notable concern is that a side effect of a full port to xcb (as opposed to more of a hybrid approach that just optimizes certain request sequences with xcb but keeps xlib for event processing) is that it would remove XIM based IME support.

XIM is arguable quite archaic and there should be better ways to support IMEs, like having direct support for ibus perhaps, but still something to consider.

We can use this https://crates.io/crates/xcb-imdkit

@rib
Copy link
Contributor

rib commented May 29, 2022

It won't and it'll likely fixed it.

Sorry I didn't quite follow this part of your reply, but yeah planning to integrate something like xcb-imdkit sounds reasonable, at least for compatibility.

I mainly just wanted to link the existence of an xcb port back to this issue and highlight that currently it would result in removing XIM based IME support.

@notgull
Copy link
Member

notgull commented Feb 25, 2023

This would be closed by #2614.

@madsmtm madsmtm linked a pull request Feb 25, 2023 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D - hard Likely harder than most tasks here DS - x11 H - help wanted Someone please save us P - low Nice to have S - enhancement Wouldn't this be the coolest?