Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ddb2d8e2
Commit
ddb2d8e2
authored
Feb 18, 2010
by
Chong Yidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* nsterm.m (ns_ring_bell): Revert last change (Bug#5569).
parent
2a4f8d3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
50 deletions
+19
-50
src/ChangeLog
src/ChangeLog
+4
-0
src/nsterm.m
src/nsterm.m
+15
-50
No files found.
src/ChangeLog
View file @
ddb2d8e2
2010-02-18 Chong Yidong <cyd@stupidchicken.com>
* nsterm.m (ns_ring_bell): Revert last change (Bug#5569).
2010-02-18 Glenn Morris <rgm@gnu.org>
2010-02-18 Glenn Morris <rgm@gnu.org>
* callint.c (Finteractive): Doc fix.
* callint.c (Finteractive): Doc fix.
...
...
src/nsterm.m
View file @
ddb2d8e2
...
@@ -808,58 +808,23 @@ Free a pool and temporary objects it refers to (callable from C)
...
@@ -808,58 +808,23 @@ Free a pool and temporary objects it refers to (callable from C)
view = FRAME_NS_VIEW (frame);
view = FRAME_NS_VIEW (frame);
if (view != nil)
if (view != nil)
{
{
/* Get the bounds of our NSView */
NSRect r, surr;
NSRect viewBounds = [view bounds];
NSPoint dim = NSMakePoint (128, 128);
/* Height of each line to flash. */
r = [view bounds];
int flash_height = FRAME_LINE_HEIGHT (frame);
r.origin.x += (r.size.width - dim.x) / 2;
int width = FRAME_PIXEL_WIDTH (frame)
r.origin.y += (r.size.height - dim.y) / 2;
- NS_SCROLL_BAR_WIDTH (frame);
r.size.width = dim.x;
r.size.height = dim.y;
/* Get the GraphicsContext */
surr = NSInsetRect (r, -2, -2);
CGContextRef ctxt = [[NSGraphicsContext currentContext] graphicsPort];
ns_focus (frame, &surr, 1);
CGRect lowerLine, upperLine;
[[view window] cacheImageInRect: [view convertRect: surr toView:nil]];
lowerLine =
[ns_lookup_indexed_color (NS_FACE_FOREGROUND
CGRectMake(viewBounds.origin.x, viewBounds.origin.y,
(FRAME_DEFAULT_FACE (frame)), frame) set];
width + NS_SCROLL_BAR_WIDTH(frame),
NSRectFill (r);
flash_height + FRAME_INTERNAL_BORDER_WIDTH (frame));
upperLine =
CGRectMake(viewBounds.origin.x,
viewBounds.origin.y + viewBounds.size.height
- (flash_height + FRAME_INTERNAL_BORDER_WIDTH (frame)),
width,
flash_height + FRAME_INTERNAL_BORDER_WIDTH (frame));
/* Invert the colors using a difference blend. */
CGContextSetBlendMode(ctxt, kCGBlendModeDifference);
CGContextSetGrayFillColor(ctxt, 1, 1);
/* If window is tall, flash top and bottom line. */
if (viewBounds.size.height > 3 * FRAME_LINE_HEIGHT (frame))
{
CGContextFillRect(ctxt, upperLine);
CGContextFillRect(ctxt, lowerLine);
}
else
/* If it is short, flash it all. */
CGContextFillRect(ctxt, NSRectToCGRect([view bounds]));
/* Bounce Dock icon. Maybe we can allow some configuration here. */
[NSApp requestUserAttention: NSInformationalRequest];
[[view window] flushWindow];
[[view window] flushWindow];
ns_timeout (150000);
ns_timeout (150000);
[[view window] restoreCachedImage];
/* If window is tall, flash top and bottom line. */
if (viewBounds.size.height > 3 * FRAME_LINE_HEIGHT (frame))
{
CGContextFillRect(ctxt, upperLine);
CGContextFillRect(ctxt, lowerLine);
}
else
/* If it is short, flash it all. */
CGContextFillRect(ctxt, NSRectToCGRect([view bounds]));
[[view window] flushWindow];
[[view window] flushWindow];
ns_unfocus (frame);
ns_unfocus (frame);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment