Skip to content

Fix popup crash when parent is layer surface#550

Merged
zccrs merged 1 commit intovioken:masterfrom
wineee:fix-a
Nov 22, 2024
Merged

Fix popup crash when parent is layer surface#550
zccrs merged 1 commit intovioken:masterfrom
wineee:fix-a

Conversation

@wineee
Copy link
Copy Markdown
Member

@wineee wineee commented Nov 22, 2024

When layer_surface is an xdg_popup's parent, the popup should created via xdg_surface::get_popup with the parent set to NULL, and 'zwlr_layer_surface_v1::get_popup' must be invoked before committing the popup's initial state.

We should use parent's notify_new_popup to avoid get a popup with NULLparent

@wineee wineee force-pushed the fix-a branch 3 times, most recently from d268f38 to 6750e39 Compare November 22, 2024 10:56
Comment thread src/server/protocols/wlayershell.h Outdated
void surfaceAdded(WLayerSurface *surface);
void surfaceRemoved(WLayerSurface *surface);

void newXdgPopupSurface(wlr_xdg_popup *popup);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

xdgPopupSurfaceAdded(WXdgPopupSurface)

Comment thread src/server/protocols/wlayershell.cpp
Comment thread src/server/protocols/wlayershell.h Outdated
When layer_surface is an xdg_popup's parent, the popup should created via xdg_surface::get_popup with the parent set to NULL, and 'zwlr_layer_surface_v1::get_popup' must be invoked before committing the popup's initial state.

We should use parent's `notify_new_popup` to avoid get a popup with NULL parent
@zccrs zccrs merged commit 459ff5e into vioken:master Nov 22, 2024
@wineee wineee deleted the fix-a branch November 22, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants