On 2011/09/04 19:47:20, djeannot24 wrote: I call the new files cocoa-*, to prevent confusion while ...
13 years, 4 months ago
(2011-09-04 19:49:52 UTC)
#2
On 2011/09/04 19:47:20, djeannot24 wrote:
I call the new files cocoa-*, to prevent confusion
while we keep the previous Cocoa attempt (but it's
maybe a bad idea). cocoa-srv.c is almost the same
as osx-srv.c, but the main function is servep9p()
instead of threadmain(), because Cocoa wants the
main thread for itself. It's possible to merge
both files (diff -n osx-srv.c cocoa-srv.c).
The flush code is a complete mess, but it is the
only way I found to do eye-candy live resizing (we
can't disable live resizing apparently). I wrote
it at the very beginning, when I was testing my
code only with colors(1), and I didn't understand
then why Devdraw was waiting 33 ms before flushing.
In Acme, you will observe a perceptible latency
(becoming annoying with multiple instances of a
same file. This is certainly because each Plan 9
flush currently gives an OS X flush (grep flushWindow).
Moving Acme's scrollbar (with mouse button staying
down) is painfully slow, because of the "always
flush" code, I think.
Live resizing with Acme often gives a Libframe
error with (not so) small windows (maybe it
doesn't come from my code, but it deadlocks my
code).
Fullscreen code is Lion-only, but it is just 2
lines of code (grep FullScreen). Maybe there is
another Lion-only function. The remaining should
work on Snow Leopard.
I used Acme extensively this week, and the window
suddenly closed once (I had similar issues with
Carbon version too).
(I quickly reimplemented qlock() and rsleep() with
Pthreads, and I used Cocoa's threads intead of
proccreate(). Libthread currently doesn't work,
and I am too ignorant to know if Libthread and
Cocoa can coexist. As the previous Cocoa attempt
don't use Libthread, it seems unlikely.)
mk cocoa && DEVDRAW=cocoa colors
Issue 4974060: Cocoa version of Devdraw (work in progress)
Created 13 years, 4 months ago by djeannot24
Modified 13 years, 4 months ago
Reviewers:
Base URL:
Comments: 0