tao icon indicating copy to clipboard operation
tao copied to clipboard

inconsistent behavior across platforms

Open wtholliday opened this issue 2 years ago • 5 comments

I'm noticing inconsistent results when using tao across macOS, windows and linux.

To reproduce, clone https://github.com/audulus/rui and check out f92d301

run: cargo run --example menu

on macOS: menu works as expected on Windows: menu doesn't appear (perhaps the menu is obscured by the wgpu viewport. tao's custom_menu example does work) on Linux: entire view is obscured (was working when using winit)

wtholliday avatar Mar 10 '22 20:03 wtholliday

On Linux, tao uses gtk so it can't work with wgpu, unless they support it explicitly. tao on Linux is not compatible with winit.

amrbashir avatar Mar 10 '22 20:03 amrbashir

Ok that explains Linux then, what about Windows?

wtholliday avatar Mar 10 '22 20:03 wtholliday

I haven't used wgpu myself and I don't know how it draws to the window on Windows so I'll have to check this myself but I am currently away for 3 weeks. I will mark this as "needs investigation" and hopefully someone can investigate it before me.

amrbashir avatar Mar 10 '22 20:03 amrbashir

Unfortunately I can't investigate this at all, the system I have right now, only supports DX11 and wgpu doesn't support DX11 yet. Can you share some screenshots? It might help me spot the issue.

amrbashir avatar Mar 31 '22 08:03 amrbashir

My bad I guess, I was looking at the supported platforms table in the README, maybe they haven't updated it yet. It turned out anyway, that my system supports DX12, I was missing a driver update but I still encounter issues with wpgu examples and still unable to run them. I won't turn this issues into a wgpu triage issue so if anyone could just provide a screenshot of the bug, I may have an idea of what is going on.

amrbashir avatar Mar 31 '22 15:03 amrbashir

hey, @wtholliday. It is been a while but I finally managed to run your menu example. And here is what I found: I thought WGPU might be blocking the menu but I made a quick c++ script that injected a menu to the rui window and it worked, I can see the menu then I checked your crate code and found out that you're using Window::set_menu to set the menu which is not supported on Windows see https://docs.rs/tao/latest/tao/window/struct.Window.html#method.set_menu .

Menus will be extracted in its own crate so you don't need to depend on tao at all, I already started working on them here https://github.com/amrbashir/muda, All features of tao menu is implemented there now so you could use it but I plan to do a rewrite for it because it had limitations which made it impossible to implement Localized Lables. see https://github.com/amrbashir/muda/issues/5

amrbashir avatar Aug 27 '22 18:08 amrbashir