]> git.eshelyaron.com Git - emacs.git/commitdiff
* nsterm.m (ns_ring_bell): Convert rect to window coordinates
authorAdrian Robert <Adrian.B.Robert@gmail.com>
Tue, 24 Feb 2009 12:44:27 +0000 (12:44 +0000)
committerAdrian Robert <Adrian.B.Robert@gmail.com>
Tue, 24 Feb 2009 12:44:27 +0000 (12:44 +0000)
before caching.

src/ChangeLog
src/nsterm.m

index c6a1abd6a3ef01aa605fbf69fd2de8b5ed00c8cd..60dc389335b588debb834b69a67a2b96adb8247e 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-24  Adrian Robert  <Adrian.B.Robert@gmail.com>
+
+       * nsterm.m (ns_ring_bell): Convert rect to window coordinates
+       before caching.
+
 2009-02-24  Kenichi Handa  <handa@m17n.org>
 
        * fontset.c (fontset_find_font): Fix the condition for checking
index b8639834e57607c658092c1ba59d2145a6f5522b..c0b68bfc1986efc65a6be0d8bb217a4dc9880d38 100644 (file)
@@ -844,11 +844,9 @@ ns_ring_bell ()
           r.origin.y += (r.size.height - dim.y) / 2;
           r.size.width = dim.x;
           r.size.height = dim.y;
-          /* XXX: cacheImageInRect under GNUstep does not account for
-             offset in x_set_window_size, so overestimate (4 fine on Cocoa) */
-          surr = NSInsetRect (r, -10, -10);
+          surr = NSInsetRect (r, -2, -2);
           ns_focus (frame, &surr, 1);
-          [[view window] cacheImageInRect: surr];
+          [[view window] cacheImageInRect: [view convertRect: surr toView:nil]];
           [ns_lookup_indexed_color (NS_FACE_FOREGROUND
                                       (FRAME_DEFAULT_FACE (frame)), frame) set];
           NSRectFill (r);