Skip to content

Commit

Permalink
Use frame instead of visibleRect (rust-windowing#3043)
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm authored and rib committed Dec 7, 2023
1 parent bacc95b commit fd6910a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ And please only add new entries to the top of this list, right below the `# Unre

# Unreleased

- Fix window size sometimes being invalid when resizing on macOS.
- On Wayland, fix maximized startup not taking full size on GNOME.
- On Wayland, fix initial window size not restored for maximized/fullscreened on startup window.
- On Wayland, `Window::outer_size` now accounts for **client side** decorations.
Expand Down
3 changes: 0 additions & 3 deletions src/platform_impl/macos/appkit/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ extern_methods!(
unsafe { msg_send_id![self, inputContext] }
}

#[sel(visibleRect)]
pub fn visibleRect(&self) -> NSRect;

#[sel(hasMarkedText)]
pub fn hasMarkedText(&self) -> bool;

Expand Down
4 changes: 2 additions & 2 deletions src/platform_impl/macos/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ declare_class!(
self.removeTrackingRect(tracking_rect);
}

let rect = self.visibleRect();
let rect = self.frame();
let tracking_rect = self.add_tracking_rect(rect, false);
self.state.tracking_rect = Some(tracking_rect);
}
Expand All @@ -220,7 +220,7 @@ declare_class!(
self.removeTrackingRect(tracking_rect);
}

let rect = self.visibleRect();
let rect = self.frame();
let tracking_rect = self.add_tracking_rect(rect, false);
self.state.tracking_rect = Some(tracking_rect);

Expand Down

0 comments on commit fd6910a

Please sign in to comment.