In the preceding fix, the checks involving GDK_IS_QUARTZ_WINDOW macros were left out. These checks are in fact crucial, because these functions are sometimes called with non-quartz functions as the original comments in the code do indicate. Therefore, reintroduce these checks. This fixes a crash in GIMP.