From: Adrian Robert Date: Tue, 24 Feb 2009 12:44:27 +0000 (+0000) Subject: * nsterm.m (ns_ring_bell): Convert rect to window coordinates X-Git-Tag: emacs-pretest-23.0.91~28 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f097e22350db31631c3cbda77f50e98400c89512;p=emacs.git * nsterm.m (ns_ring_bell): Convert rect to window coordinates before caching. --- diff --git a/src/ChangeLog b/src/ChangeLog index c6a1abd6a3e..60dc389335b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-02-24 Adrian Robert + + * nsterm.m (ns_ring_bell): Convert rect to window coordinates + before caching. + 2009-02-24 Kenichi Handa * fontset.c (fontset_find_font): Fix the condition for checking diff --git a/src/nsterm.m b/src/nsterm.m index b8639834e57..c0b68bfc198 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -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);