wibox_position_update(): Skip wibox if wibox.screen is nil
If a wibox's screen is set to nil, this is reflected by setting the screen struct member to SCREEN_UNDEF. SCREEN_UNDEF is defined as -1. If we allow such a wibox in wibox_position_update(), bad things will happen (globalconf.screens[-1]). Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
67c96cbebc
commit
99a8dbeaf7
6
wibox.c
6
wibox.c
|
@ -295,6 +295,12 @@ wibox_position_update(wibox_t *wibox)
|
||||||
area_t area, wingeom = wibox->sw.geometry;
|
area_t area, wingeom = wibox->sw.geometry;
|
||||||
bool ignore = false;
|
bool ignore = false;
|
||||||
|
|
||||||
|
/* Everything we do below needs the wibox' screen.
|
||||||
|
* No screen, nothing to do.
|
||||||
|
*/
|
||||||
|
if (wibox->screen == SCREEN_UNDEF)
|
||||||
|
return;
|
||||||
|
|
||||||
globalconf.screens[wibox->screen].need_arrange = true;
|
globalconf.screens[wibox->screen].need_arrange = true;
|
||||||
|
|
||||||
/* Place wibox'es at the edge of the screen, struts come later. */
|
/* Place wibox'es at the edge of the screen, struts come later. */
|
||||||
|
|
Loading…
Reference in New Issue