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

Fix wayland build #116

Open
wants to merge 864 commits into
base: master
Choose a base branch
from
Open

Fix wayland build #116

wants to merge 864 commits into from

Conversation

trimental
Copy link
Contributor

This is basically two fixes, the first one is because using winits hidpi is the proper method for wayland and using get_current_monitor() on a wayland window that hasnt yet been displayed leads to a panic.

I have absolutely not idea why the second fix works but it consists of not ignoring Refresh events and swapping the buffers before resizing the gl_window. Perhaps @vberger has an idea about this?

fschutt and others added 30 commits December 13, 2018 20:32
Rusttype upgraded stb_truetype to 0.2.5 (a minor version bump) while also upgrading
to Rust 2018, which caused a major breakage, because now this project is
incompatible with Rust 1.30.

Slight rant incoming: I am increasingly getting sick of rusttype, at least for this
project. Yes, it's pure-Rust, but in practical terms that doesn't mean shit. Back in
February, rusttype managed to break azuls entire dependencies by yanking rusttype
from crates.io and only releasing a major-version-breaking bugfix (this type of
yanking also breaks cargo in an npm-leftpad-style fashion, and while I reported this
problem to the cargo team, it got completely ignored, yay "we hear you").

Every time I've had build problems in the past, it was mostly rusttype that broke
the build. I can't rely on such an unstable crate in my dependencies, for fucks
sake, get your shit together.

Add to that that rusttypes API is pretty horrible (what metric is "rusttype::Scale"?
- oh yeah, it's just "scale", not "millimeter" or "point" or anything meaningful),
rusttype doesn't support OTF or PostScript fonts, just the most bare-bones TTF
fonts, the kerning is buggy as shit, meaning that half the time it doesn't work
("fi" isn't getting kerned, even in fonts that do support it). Plus the constant
version breaking and we have to ship freetype anyway, as it's a requirement for
webrender, so it just adds dependencies while limiting the use of fonts to just TTF
ones.

So yeah, I'll start to remove rusttype from my dependencies in the future and switch
to freetype. I'm sick of this shit.
fschutt and others added 17 commits March 17, 2019 18:37
Also fix a few missing imports when compiling with
feature "image_loading"
For some reason, flex-grow is now very unstable (can break the layout)
Cleaned up text layout API, removed overflow since reflowing text
has to be handled in the UI solver, not the text layout itself
It isn't necessary to have a FontInstance or a FontInstanceKey
in order to do text layout, that was only necessary for the old
layout code that used the RenderApis built-in text layout functions
…vis.yml

Travis should now check with "--all-features", since otherwise a lot of tests
wouldn't run.
@trimental
Copy link
Contributor Author

@fschutt both fixes are still needed despite the changes from the positioned_words branch.

Filtering out refresh events may be intentional however it causes the problem of the window not appearing on wayland, perhaps there's another way to fix this however.

@neyb
Copy link

neyb commented Jun 2, 2019

Using actual master does not work when using Wayland. With this fix it seems to be ok. Need help updating the branch onto actual master?

@trimental
Copy link
Contributor Author

@neyb I’d happily update this PR to master.

Unfortunately it seems that this PR is considered inadequate for the moment, which is fair enough considering it changes the Refresh event handling.

Saying that, I hope this issue will be resolved shortly as lacking support for wayland systems (gnome, sway, etc) is a huge issue for a GUI toolkit imo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants