Skip to content

width/height swapped in native_window_set_bounds #33

@ZERO-white

Description

@ZERO-white

Thank you for developing and sharing this project.

As you may already have noticed, in src/capi/window_c.cpp line 215,
it appears that the width and height are passed in the wrong order when constructing the Rectangle.

// Window geometry operations
FFI_PLUGIN_EXPORT
void native_window_set_bounds(native_window_t window, native_rectangle_t bounds) {
  if (!window)
    return;
  auto* win = static_cast<nativeapi::Window*>(window);
  Rectangle rect = {bounds.x, bounds.y, bounds.height, bounds.width}; // should be {x, y, width, height}
  win->SetBounds(rect);
}

I wasn't sure if opening a PR directly would be appropriate, so I'm leaving this issue instead.
Thanks, and have a great day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions