X11 & Wayland api update#1
Conversation
|
Nice one! I just finished testing the examples with wayland and they mostly seem great, only two issues popped up:
Any idea what might be going on with either of these? No worries if not, I'll merge this either way as it's still a big improvement over master 👍 |
|
Right now I don't know exactly what's the issue with these. I cannot test it right now, but are these a regression with relation to the current released glutin? If not, it's probably a more profound issue with the backend that I'll investigate independently of the API refactor. |
|
On the current master, both the and So no, these don't seem to be regressions but are probably some other deeper issue with the backend as you mention. Going to merge this, thanks a lot! |
|
Agh I just realised that I was testing an older version of master. After updating master and running the tests:
|
|
I'm also noticing a bug on macos when running the updated multiwindow example. The example immediately segfaults and exits which looks suspiciously similar to the behaviour on wayland (however wayland gives no indication of a segfault occuring). So this could have something to do with my changes prior to this PR! I'm wondering if it has something to do with the fact that all windows are now run from the same thread (rather than each on unique threads as was originally the case) - perhaps this is causing the |
|
That's entirely possible that the issue comes from the opengl code. AFAIK having multiple contextes / multiple threads require some care, but I'm not very knowledgeable in this tbh. |
|
I tried to multiwindow example, and it dies with a SIGSEGV on my system, both under X11 and wayland. And the "the triangle is not resized" but occurs for both X11 and Wayland too for me. But, I'm being curious: the examples of glutin have a bug, causing them to be stuck before even displaying the window (they enter the event loop without drawing at least once, and on wayland the window does not appear if it has not be drawn yet, and thus the examples receive no events at all, and thus the event loop remains stuck). Didn't you have to correct for this to run the examples on wayland? |
I was aware of this before testing on wayland as it happens on macOS too, however on macOS the windows still open but remain gray until an event is received. I must have been moving my mouse or something each time I ran the wayland examples as I didn't notice it when running them. I think the behaviour is the same as it was prior to the api-update. |
|
Hmm, what wayland compositor are you using? Because, for me, using weston, the windows don't appear at all, and cannot receive input events before it has appeared. I guess your compositor must be sending some event to the window anyway. ^^ |
|
Ahh interesting, I'm using the default fedora v25 setup which uses GNOME. |
I've updated the X11 and Wayland glutin backends to new winit api
I also fixed some examples that didn't compile any more.