mirror of
https://github.com/brl/mutter.git
synced 2025-07-23 10:01:35 +00:00
Simplify the frame testing logic in callers to grab borders
A lot of code did something similar to: MetaFrameBorders borders; if (window->frame) meta_frame_calc_borders (window->frame, &borders); else meta_frame_borders_clear (&borders); Sometimes, the else part was omitted and we were unknowingly using uninitalized values for OR windows. Clean this up by just testing for a NULL frame in meta_frame_calc_borders and clearing for the caller if so. https://bugzilla.gnome.org/show_bug.cgi?id=643606
This commit is contained in:
@ -573,7 +573,7 @@ place_window_if_needed(MetaWindow *window,
|
||||
META_MAXIMIZE_VERTICAL : 0), &info->current);
|
||||
|
||||
/* maximization may have changed frame geometry */
|
||||
if (window->frame && !window->fullscreen)
|
||||
if (!window->fullscreen)
|
||||
meta_frame_calc_borders (window->frame, info->borders);
|
||||
|
||||
if (window->fullscreen_after_placement)
|
||||
|
Reference in New Issue
Block a user