Mercurial > emacs
comparison src/nsterm.m @ 102242:09a2c0075422
* nsterm.m (ns_ring_bell): Convert rect to window coordinates
before caching.
author | Adrian Robert <Adrian.B.Robert@gmail.com> |
---|---|
date | Tue, 24 Feb 2009 12:42:00 +0000 |
parents | df135773c0eb |
children | 87d779fe8006 |
comparison
equal
deleted
inserted
replaced
102241:ef1ec0a2e8dd | 102242:09a2c0075422 |
---|---|
842 r = [view bounds]; | 842 r = [view bounds]; |
843 r.origin.x += (r.size.width - dim.x) / 2; | 843 r.origin.x += (r.size.width - dim.x) / 2; |
844 r.origin.y += (r.size.height - dim.y) / 2; | 844 r.origin.y += (r.size.height - dim.y) / 2; |
845 r.size.width = dim.x; | 845 r.size.width = dim.x; |
846 r.size.height = dim.y; | 846 r.size.height = dim.y; |
847 /* XXX: cacheImageInRect under GNUstep does not account for | 847 surr = NSInsetRect (r, -2, -2); |
848 offset in x_set_window_size, so overestimate (4 fine on Cocoa) */ | |
849 surr = NSInsetRect (r, -10, -10); | |
850 ns_focus (frame, &surr, 1); | 848 ns_focus (frame, &surr, 1); |
851 [[view window] cacheImageInRect: surr]; | 849 [[view window] cacheImageInRect: [view convertRect: surr toView:nil]]; |
852 [ns_lookup_indexed_color (NS_FACE_FOREGROUND | 850 [ns_lookup_indexed_color (NS_FACE_FOREGROUND |
853 (FRAME_DEFAULT_FACE (frame)), frame) set]; | 851 (FRAME_DEFAULT_FACE (frame)), frame) set]; |
854 NSRectFill (r); | 852 NSRectFill (r); |
855 [[view window] flushWindow]; | 853 [[view window] flushWindow]; |
856 ns_timeout (150000); | 854 ns_timeout (150000); |