Tweak the workaround from
9023a2e so that it only triggers if there
actually is a problem to fix. This is important since changing levels
also has the side effect of raising the window to the top of the level.
fullscreen_screens(top, bottom, left, right);
#ifdef __APPLE__
// This is a workaround for a bug in FLTK, see: https://github.com/fltk/fltk/pull/277
- cocoa_set_level(this, savedLevel);
+ if (cocoa_get_level(this) != savedLevel)
+ cocoa_set_level(this, savedLevel);
#endif
if (!fullscreen_active())