Skip to content

fix: fix cast in ElectronDesktopWindowTreeHostLinux#42179

Merged
VerteDinde merged 1 commit intoelectron:mainfrom
indutny-signal:fix/gh-41839
May 14, 2024
Merged

fix: fix cast in ElectronDesktopWindowTreeHostLinux#42179
VerteDinde merged 1 commit intoelectron:mainfrom
indutny-signal:fix/gh-41839

Conversation

@indutny-signal
Copy link
Contributor

Description of Change

The frame view of the widget is an ClientFrameViewLinux instance only when both frame and client_frame booleans are set to true. Otherwise it is an instance of a different class and thus casting to ClientFrameViewLinux is incorrect and leads to crashes.

Fix: #41839

cc @VerteDinde @ckerr

Checklist

Release Notes

Notes: Fix crash on window maximize on X11

The frame view of the widget is an `ClientFrameViewLinux` instance only
when both `frame` and `client_frame` booleans are set to `true`.
Otherwise it is an instance of a different class and thus casting to
`ClientFrameViewLinux` is incorrect and leads to crashes.

Fix: electron#41839
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label May 14, 2024
@VerteDinde VerteDinde added target/30-x-y PR should also be added to the "30-x-y" branch. target/31-x-y PR should also be added to the "31-x-y" branch. semver/patch backwards-compatible bug fixes labels May 14, 2024
Copy link
Member

@VerteDinde VerteDinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thank you so much for this fix!

@VerteDinde VerteDinde added the fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases label May 14, 2024
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label May 14, 2024
@VerteDinde VerteDinde changed the title Fix cast in ElectronDesktopWindowTreeHostLinux fix fix cast in ElectronDesktopWindowTreeHostLinux May 14, 2024
@VerteDinde VerteDinde changed the title fix fix cast in ElectronDesktopWindowTreeHostLinux fix: fix cast in ElectronDesktopWindowTreeHostLinux May 14, 2024
@VerteDinde VerteDinde merged commit f2af351 into electron:main May 14, 2024
@release-clerk
Copy link

release-clerk bot commented May 14, 2024

Release Notes Persisted

Fix crash on window maximize on X11

@trop
Copy link
Contributor

trop bot commented May 14, 2024

I have automatically backported this PR to "31-x-y", please check out #42184

@trop trop bot added in-flight/31-x-y and removed target/31-x-y PR should also be added to the "31-x-y" branch. labels May 14, 2024
@trop
Copy link
Contributor

trop bot commented May 14, 2024

I have automatically backported this PR to "30-x-y", please check out #42185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases merged/30-x-y PR was merged to the "30-x-y" branch. merged/31-x-y PR was merged to the "31-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: SIGSEGV crash when maximizing window

2 participants