wayland: Phase 71b — additional frame NULL guards in actions.c
Guard the remaining wwin->frame dereferences that are reachable for Wayland windows: - wSetFocusTo: skip ChangeStackingLevel for fullscreen if !frame - set_window_coords: fall back to client size when frame is NULL (called by find_Maximus_geometry on neighbour windows) - wFullscreenMonitorsWindow: early return if !frame - wMakeWindowVisible: skip wRaiseFrame if !frame Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
7734929cd5
commit
341413b7e3
|
|
@ -217,7 +217,7 @@ void wSetFocusTo(WScreen *scr, WWindow *wwin)
|
|||
}
|
||||
|
||||
/* reset fullscreen if temporarily removed due to lost focus*/
|
||||
if (wwin->flags.fullscreen)
|
||||
if (wwin->flags.fullscreen && wwin->frame)
|
||||
ChangeStackingLevel(wwin->frame->core, WMFullscreenLevel);
|
||||
}
|
||||
|
||||
|
|
@ -814,8 +814,9 @@ static void set_window_coords(WWindow *wwin, win_coords *obs)
|
|||
{
|
||||
obs->left = wwin->frame_x;
|
||||
obs->top = wwin->frame_y;
|
||||
obs->width = wwin->frame->core->width;
|
||||
obs->height = wwin->frame->core->height;
|
||||
/* Phase 71: Wayland windows have no frame; fall back to client size */
|
||||
obs->width = wwin->frame ? wwin->frame->core->width : wwin->client.width;
|
||||
obs->height = wwin->frame ? wwin->frame->core->height : wwin->client.height;
|
||||
obs->bottom = obs->top + obs->height;
|
||||
obs->right = obs->left + obs->width;
|
||||
}
|
||||
|
|
@ -967,6 +968,9 @@ void wFullscreenMonitorsWindow(WWindow *wwin, unsigned long top, unsigned long b
|
|||
int i;
|
||||
long monitor;
|
||||
WMRect rect1, rect2;
|
||||
if (!wwin->frame)
|
||||
return; /* Phase 71: Wayland — no frame for fullscreen-monitors */
|
||||
|
||||
|
||||
if ((int)top < wwin->screen_ptr->head_count &&
|
||||
(int)bottom < wwin->screen_ptr->head_count &&
|
||||
|
|
@ -2236,7 +2240,8 @@ void wMakeWindowVisible(WWindow *wwin)
|
|||
} else {
|
||||
if (!WFLAGP(wwin, no_focusable))
|
||||
wSetFocusTo(wwin->screen_ptr, wwin);
|
||||
wRaiseFrame(wwin->frame->core);
|
||||
if (wwin->frame)
|
||||
wRaiseFrame(wwin->frame->core); /* Phase 71: skip for Wayland */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue