Introduction
Introduction Statistics Contact Development Disclaimer Help
tdevdraw: flush window on kEventAppShow - plan9port - [fork] Plan 9 from user s…
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 834d2a4dffe28ce4119d610028e9e48c59cefe4d
parent 9a0e0048423b0afe1da390354eca315d06ef165b
Author: Jeff Sicket <[email protected]>
Date: Sun, 17 May 2009 11:07:09 -0700
devdraw: flush window on kEventAppShow
Diffstat:
M src/cmd/devdraw/osx-screen.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/cmd/devdraw/osx-screen.c b/src/cmd/devdraw/osx-screen.c
t@@ -80,6 +80,7 @@ enum
};
void screeninit(void);
+void _flushmemscreen(Rectangle r);
Memimage*
attachscreen(char *label, char *winsize)
t@@ -126,7 +127,7 @@ _screeninit(void)
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();
t@@ -165,6 +166,7 @@ _screeninit(void)
{ kEventClassWindow, kEventWindowDeactivated },
};
const EventTypeSpec events[] = {
+ { kEventClassApplication, kEventAppShown },
{ kEventClassKeyboard, kEventRawKeyDown },
{ kEventClassKeyboard, kEventRawKeyModifiersChanged },
{ kEventClassKeyboard, kEventRawKeyRepeat },
t@@ -244,6 +246,11 @@ eventhandler(EventHandlerCallRef next, EventRef event, vo…
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);
t@@ -267,7 +274,7 @@ eventhandler(EventHandlerCallRef next, EventRef event, voi…
}
break;
- case kEventClassWindow:;
+ case kEventClassWindow:
switch(GetEventKind(event)){
case kEventWindowClosed:
exit(0);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.