Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(841)

Issue 5499043: cocoa devdraw: drawing fix

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by djeannot24
Modified:
12 years, 2 months ago
Reviewers:
CC:
rsc, codebot
Visibility:
Public.

Description

Devdraw now waits for the image: this means that there is no more blank image when toggling fullscreen, when unminimizing, or at startup; this also means that we can live resize, but we only enable live resizing with Page, because it seems useless for other apps, and Acme and Sam bug with it. The tradeoff is that bottom corners are sometimes automatically rounded. There is a way to prevent the rounding here: http://parmanoir.com/Custom_NSThemeFrame but this would obfuscate the code. Instead, we make sure that the corners are always rounded. Closing the window while its content is updated causes an exception, without this patch. This seems to happen regularly with stats(1). This patch avoids a possible deadlock at startup, which I never experienced. If I recollect right, there is little chance that this happens on a multi-core CPU. Minimizing now activates next app in line, and Devdraw now stops drawing while minimized.

Patch Set 1 #

Patch Set 2 : diff -r 92a579c6549c http://code.swtch.com/plan9port/ #

Patch Set 3 : revert minor changes to avoid conflict with simultaneous issues #

Patch Set 4 : no live resizing; corners sometimes rounded #

Patch Set 5 : no live resizing; corners always rounded #

Patch Set 6 : reverse changes going in separate issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -78 lines) Patch
M src/cmd/devdraw/cocoa-screen.m View 1 2 3 4 5 16 chunks +230 lines, -78 lines 0 comments Download

Messages

Total messages: 9
djeannot24
12 years, 4 months ago (2012-01-01 04:22:50 UTC) #1
rsc
There are multiple things going on here. I am not sure that all are worth ...
12 years, 4 months ago (2012-01-16 22:19:11 UTC) #2
djeannot24
12 years, 4 months ago (2012-01-18 14:56:23 UTC) #3
djeannot24
12 years, 4 months ago (2012-01-18 15:06:58 UTC) #4
djeannot24
(I have pulled plan9port in between, so Codereview's "Delta from patch set" between 4 and ...
12 years, 4 months ago (2012-01-18 15:54:01 UTC) #5
djeannot24
12 years, 2 months ago (2012-03-05 20:42:03 UTC) #6
djeannot24
(I don't know if you are interested by this patch, but I have updated its ...
12 years, 2 months ago (2012-03-05 20:54:17 UTC) #7
rsc
Thanks very much for the fix.
12 years, 2 months ago (2012-03-05 20:54:33 UTC) #8
rsc
12 years, 2 months ago (2012-03-05 20:55:34 UTC) #9
*** Submitted as http://code.google.com/p/plan9port/source/detail?r=b7f9f63245ee
***

Devdraw now waits for the image: this means that
there is no more blank image when toggling
fullscreen, when unminimizing, or at startup; this
also means that we can live resize, but we only
enable live resizing with Page, because it seems
useless for other apps, and Acme and Sam bug with
it. The tradeoff is that bottom corners are
sometimes automatically rounded. There is a way to
prevent the rounding here:
http://parmanoir.com/Custom_NSThemeFrame
but this would obfuscate the code. Instead, we
make sure that the corners are always rounded.

Closing the window while its content is updated
causes an exception, without this patch. This
seems to happen regularly with stats(1).

This patch avoids a possible deadlock at startup,
which I never experienced. If I recollect right,
there is little chance that this happens on a
multi-core CPU.

Minimizing now activates next app in line, and
Devdraw now stops drawing while minimized.

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5499043

Committer: Russ Cox <rsc@swtch.com>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b