From: Jeff Sickel <jas@corpus-callosum.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Cc: Russ Cox <rsc@swtch.com>
Subject: Re: [9fans] Porter-Duff alpha blending
Date: Sun, 8 Mar 2009 17:33:20 -0500 [thread overview]
Message-ID: <0A32B279-D8F3-425C-BFD0-E631D50736B1@corpus-callosum.com> (raw)
In-Reply-To: <14ec7b180903061342r1adca970gc1efa508ff9c8fb8@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 397 bytes --]
All this chatter about blending and Russ' recent updates to p9p
encouraged me to finally fix a small thing that's annoyed me with
devdraw's on OS X: that odd blank (all white) window when waking a
machine from sleep, exiting a screen saver, or un-hiding a devdraw
based application.
Here's the patch all ready for an hg import (should also be applied to
drawterm, and Inferno's win.c):
[-- Attachment #2: 2994.patch --]
[-- Type: application/octet-stream, Size: 1740 bytes --]
# HG changeset patch
# User Jeff Sickel <jas@corpus-callosum.com>
# Date 1236550276 18000
# Node ID 10b09a2845ad89d87369bf6dcf1ee82ea60bd7ac
# Parent 263100a4d8b2cb93acc35fec46d86289e9aff1ae
flush window on kEventAppShow
diff -r 263100a4d8b2 -r 10b09a2845ad src/cmd/devdraw/osx-screen.c
--- a/src/cmd/devdraw/osx-screen.c Fri Mar 06 12:25:38 2009 -0800
+++ b/src/cmd/devdraw/osx-screen.c Sun Mar 08 17:11:16 2009 -0500
@@ -80,6 +80,7 @@
};
void screeninit(void);
+void _flushmemscreen(Rectangle r);
Memimage*
attachscreen(char *label, char *winsize)
@@ -126,7 +127,7 @@
CFSTR("Full Screen"), 0, CmdFullScreen, &ix);
SetMenuItemCommandKey(osx.vmenu, ix, 0, 'F');
AppendMenuItemTextWithCFString(osx.vmenu,
- CFSTR("Ctl-Opt exits full screen"),
+ CFSTR("Cmd-F exits full screen"),
kMenuItemAttrDisabled, CmdFullScreen, &ix);
InsertMenu(osx.vmenu, GetMenuID(osx.wmenu));
DrawMenuBar();
@@ -165,6 +166,7 @@
{ kEventClassWindow, kEventWindowDeactivated },
};
const EventTypeSpec events[] = {
+ { kEventClassApplication, kEventAppShown },
{ kEventClassKeyboard, kEventRawKeyDown },
{ kEventClassKeyboard, kEventRawKeyModifiersChanged },
{ kEventClassKeyboard, kEventRawKeyRepeat },
@@ -244,6 +246,11 @@
result = CallNextEventHandler(next, event);
switch(GetEventClass(event)){
+ case kEventClassApplication:;
+ Rectangle r = Rect(0, 0, Dx(osx.screenr), Dy(osx.screenr));
+ _flushmemscreen(r);
+ return eventNotHandledErr;
+
case kEventClassKeyboard:
return kbdevent(event);
@@ -267,7 +274,7 @@
}
break;
- case kEventClassWindow:;
+ case kEventClassWindow:
switch(GetEventKind(event)){
case kEventWindowClosed:
exit(0);
[-- Attachment #3: Type: text/plain, Size: 4 bytes --]
next prev parent reply other threads:[~2009-03-08 22:33 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 21:32 erik quanstrom
2009-03-04 21:37 ` andrey mirtchovski
2009-03-04 21:42 ` andrey mirtchovski
2009-03-04 21:44 ` erik quanstrom
2009-03-04 21:53 ` andrey mirtchovski
2009-03-04 22:03 ` erik quanstrom
2009-03-04 22:21 ` andrey mirtchovski
2009-03-04 22:22 ` Devon H. O'Dell
2009-03-04 22:45 ` andrey mirtchovski
2009-03-04 22:59 ` erik quanstrom
2009-03-04 23:05 ` andrey mirtchovski
2009-03-04 23:58 ` Charles Forsyth
2009-03-05 1:04 ` erik quanstrom
2009-03-05 1:29 ` andrey mirtchovski
2009-03-05 2:07 ` andrey mirtchovski
2009-03-05 2:22 ` erik quanstrom
2009-03-06 3:21 ` andrey mirtchovski
2009-03-06 20:48 ` Russ Cox
2009-03-06 21:42 ` andrey mirtchovski
2009-03-08 22:33 ` Jeff Sickel [this message]
2009-03-09 15:28 ` Michaelian Ennis
2009-03-09 16:40 ` Jeff Sickel
2009-03-09 14:00 ` erik quanstrom
2009-03-09 15:32 ` yy
2009-03-04 21:53 erik quanstrom
2009-03-04 22:01 ` andrey mirtchovski
2009-03-05 18:31 maht
2009-03-04 21:18 ` andrey mirtchovski
2009-03-04 23:24 ` Russ Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0A32B279-D8F3-425C-BFD0-E631D50736B1@corpus-callosum.com \
--to=jas@corpus-callosum.com \
--cc=9fans@9fans.net \
--cc=rsc@swtch.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).