Skip to content
This repository was archived by the owner on Jan 11, 2020. It is now read-only.

ViewType is incorrectly constructed and always 0 #57

Open
Drakulix opened this issue Oct 17, 2016 · 1 comment
Open

ViewType is incorrectly constructed and always 0 #57

Drakulix opened this issue Oct 17, 2016 · 1 comment
Assignees
Milestone

Comments

@Drakulix
Copy link

Drakulix commented Oct 17, 2016

Casting directly from uint32_t to ViewType in the Defintion of wlc_view_get_type(view: wlc_handle) -> ViewData is failing, since ViewType is a full blown struct without a repr(C) definition and its bit-field is actually an u64 instead of an u32, so casting should never work and does not on my system (it is always 0).

Because the concrete Implementation of ViewType should not be expected to be stable anyway, wlc_view_get_type(view: wlc_handle) -> ViewData should really be wlc_view_get_type(view: wlc_handle) -> u32 instead with the return value of view.get_type() generated by ViewType::from_bits(), which should do the conversion correctly.

@Timidger
Copy link
Member

👍 We are doing a round of cleanup right now, I'll add this to the list.

@Timidger Timidger assigned Timidger and unassigned SnirkImmington Jan 12, 2017
@Timidger Timidger added this to the Cleanup milestone Jan 12, 2017
@SnirkImmington SnirkImmington self-assigned this Jan 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants