Cloudef / wlc

High-level Wayland compositor library
MIT License
330 stars 58 forks source link

Stop writepixels from crashing #141

Closed crondog closed 8 years ago

crondog commented 8 years ago

Not sure if this is a correct solution but it is here just for conversation

The crash is from https://github.com/SirCmpwn/sway/commit/7dc335bb46451ce984cb89bb7ed45ca932b2324d

Cloudef commented 8 years ago

This seems very far fetched. But you might be on something, shm buffer attachs do set UNPACK_ROW_LENGTH_EXT which is never reset back to initial value (0).

crondog commented 8 years ago

If i do GL_CALL(glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, 0)); at the end of shm_attach instead of the what i did in the pull it works

crondog commented 8 years ago

Would that be the right place to do it? Or do you have somewhere better in mind to reset it?

ddevault commented 8 years ago

Something I can't believe I failed to mention until now is that window borders do render correctly the first time around, and continue to do so every frame until something changes.

Cloudef commented 8 years ago

@crondog That would be the right place yes.