wayland: Phase 52 — guard wWindowMap/Unmap and misc X11 paths for NULL frame
Add if (wwin->frame) guards to wWindowMap and wWindowUnmap so that frameless Wayland windows do not dereference wwin->frame->core->window. Guard getCommandForWindow in misc.c against NULL dpy to prevent XGetCommand crash when the PID-based haveCommand path fires. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c36bd7384e
commit
8f0c54240e
|
|
@ -1638,7 +1638,8 @@ void wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed)
|
|||
|
||||
void wWindowMap(WWindow *wwin)
|
||||
{
|
||||
wm_backend->window_map(wwin->frame->core->window);
|
||||
if (wwin->frame) /* Wayland: no frame window to map */
|
||||
wm_backend->window_map(wwin->frame->core->window);
|
||||
if (!wwin->flags.shaded) {
|
||||
/* window will be remapped when getting MapNotify */
|
||||
wm_backend->window_select_events(wwin->client_win,
|
||||
|
|
@ -1660,7 +1661,8 @@ void wWindowUnmap(WWindow *wwin)
|
|||
wm_backend->window_unmap(wwin->client_win);
|
||||
wm_backend->window_select_events(wwin->client_win, wwin->event_mask);
|
||||
|
||||
wm_backend->window_unmap(wwin->frame->core->window);
|
||||
if (wwin->frame) /* Wayland: no frame window to unmap */
|
||||
wm_backend->window_unmap(wwin->frame->core->window);
|
||||
}
|
||||
|
||||
void wWindowSingleFocus(WWindow *wwin)
|
||||
|
|
|
|||
Loading…
Reference in New Issue