jcs
/wallops
/amendments
/61
main: Always SetPort to an update window
jcs made amendment 61 3 months ago
--- main.c Fri Aug 30 22:20:53 2024
+++ main.c Tue Sep 3 14:56:14 2024
@@ -155,19 +155,19 @@ main(void)
case activateEvt:
event_win = (WindowPtr)event.message;
- if (event.what == updateEvt) {
- GetPort(&old_port);
- SetPort(event_win);
+ GetPort(&old_port);
+ SetPort(event_win);
+
+ if (event.what == updateEvt)
BeginUpdate(event_win);
- }
if (found_focusable && found_focusable->update)
found_focusable->update(found_focusable, &event);
- if (event.what == updateEvt) {
+ if (event.what == updateEvt)
EndUpdate(event_win);
- SetPort(old_port);
- }
+
+ SetPort(old_port);
break;
case app4Evt:
if (HiWord(event.message) & (1 << 8)) {