# yudit-3.1.0.patch3.txt (v2) # URL: https://yudit.org/ # Urgency: high on Macintosh low elsewhere # # This patch fixes the following problems on Macintosh: # - Gray screen problem after macOS 14 SDK update # - PageDown and PageUp functionality # # Gaspar Sinai 2024-03-10, Tokyo # *** yudit-3.1.0/swindow/sosx/SCocoa.mm- 2023-01-26 15:43:59.000000000 +0900 --- yudit-3.1.0/swindow/sosx/SCocoa.mm 2024-03-10 16:46:46.820534443 +0900 *************** *** 310,313 **** --- 310,318 ---- self.currentImage = nil; self.graphicsContext = nil; + // This alonde should solve -(void)drawRect:(NSRect)dirtyRect problenm + // Added to make top level menu swiping possible. + if ([self respondsToSelector:@selector(setClipsToBounds:)]) { + [self performSelector:@selector(setClipsToBounds:) withObject:@YES]; + } self->cocoaHasMinimumSize = false; self->currentScroll = 0.0; *************** *** 760,774 **** if (self.cppWindow == nil) return; self.graphicsContext = nil; ! NSColor *bgc = cocoaConvertColor (self.cppWindow->background); [bgc set]; ! NSRectFill (dirtyRect); if (self.cppWindow->listener != nil) { self.cppWindow->listener->redraw (self.cppWindow, ! (int)dirtyRect.origin.x, ! (int)dirtyRect.origin.y, ! (unsigned int)dirtyRect.size.width, ! (unsigned int)dirtyRect.size.height); } // redraw set it. --- 765,781 ---- if (self.cppWindow == nil) return; self.graphicsContext = nil; ! // from macOS 14 SDK clipsToBounds property of NSView is exposed and false ! // Restoring old functionality by modifying dirtyRect. ! NSRect clippedRect = NSIntersectionRect(dirtyRect, self.bounds); NSColor *bgc = cocoaConvertColor (self.cppWindow->background); [bgc set]; ! NSRectFill(clippedRect); if (self.cppWindow->listener != nil) { self.cppWindow->listener->redraw (self.cppWindow, ! (int)clippedRect.origin.x, ! (int)clippedRect.origin.y, ! (unsigned int)clippedRect.size.width, ! (unsigned int)clippedRect.size.height); } // redraw set it. *** yudit-3.1.0/swindow/sosx/SKeyboard.mm- 2023-01-14 15:16:52.000000000 +0900 --- yudit-3.1.0/swindow/sosx/SKeyboard.mm 2024-03-10 19:28:23.116818883 +0900 *************** *** 190,196 **** --- 190,198 ---- // Key_Prior, + [kVK_PageUp] =SWindowListener::Key_Prior, [kVK_End] =SWindowListener::Key_End, [kVK_Return] =SWindowListener::Key_Return, // Key_Next, + [kVK_PageDown] =SWindowListener::Key_Next, [kVK_ANSI_KeypadEnter] =SWindowListener::Key_Enter, // Key_Enter,