fix: NativeWindow.window_id() returns same value for all windows (#46590)

fix: NativeWindow.window_id() returns same value for all windows

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2025-04-10 11:28:58 +02:00 committed by GitHub
parent 8b3c52f242
commit 70fd706ea4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 7 deletions

View file

@ -94,8 +94,6 @@ gfx::Size GetExpandedWindowSize(const NativeWindow* window, gfx::Size size) {
NativeWindow::NativeWindow(const gin_helper::Dictionary& options,
NativeWindow* parent)
: widget_(std::make_unique<views::Widget>()), parent_(parent) {
++next_id_;
options.Get(options::kFrame, &has_frame_);
options.Get(options::kTransparent, &transparent_);
options.Get(options::kEnableLargerThanScreen, &enable_larger_than_screen_);
@ -820,9 +818,6 @@ void NativeWindow::HandlePendingFullscreenTransitions() {
SetFullScreen(next_transition);
}
// static
int32_t NativeWindow::next_id_ = 0;
bool NativeWindow::IsTranslucent() const {
// Transparent windows are translucent
if (transparent()) {