* patch for nsterm.m to fix visual-bell
@ 2009-06-30 3:53 Ryan Davis
2009-06-30 20:19 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Ryan Davis @ 2009-06-30 3:53 UTC (permalink / raw)
To: emacs-devel
Current visual-bell on nextstep emacs is a small black square right in
the middle of the frame. I find it incredibly jarring and it often
breaks my concentration.
This patch changes it to be 1 line height at the bottom of the window
over the minibuffer much like the previous visual-bell in 22.3. 22.3
also has a line at the top but I didn't want to futz with the patch
more than I had to lest it not get accepted. The patch is available at:
http://paste.segment7.net/q
or below:
Index: src/nsterm.m
===================================================================
RCS file: /cvsroot/emacs/emacs/src/nsterm.m,v
retrieving revision 1.76
diff -u -r1.76 nsterm.m
--- src/nsterm.m 26 Jun 2009 18:37:41 -0000 1.76
+++ src/nsterm.m 30 Jun 2009 03:51:45 -0000
@@ -836,13 +836,10 @@
if (view != nil)
{
NSRect r, surr;
- NSPoint dim = NSMakePoint (128, 128);
r = [view bounds];
- r.origin.x += (r.size.width - dim.x) / 2;
- r.origin.y += (r.size.height - dim.y) / 2;
- r.size.width = dim.x;
- r.size.height = dim.y;
+ r.origin.y += r.size.height - FRAME_LINE_HEIGHT(frame) - 2;
+ r.size.height = FRAME_LINE_HEIGHT(frame) + 2;
surr = NSInsetRect (r, -2, -2);
ns_focus (frame, &surr, 1);
[[view window] cacheImageInRect: [view convertRect: surr
toView:nil]];
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: patch for nsterm.m to fix visual-bell
2009-06-30 3:53 patch for nsterm.m to fix visual-bell Ryan Davis
@ 2009-06-30 20:19 ` Stefan Monnier
2009-07-01 0:03 ` Miles Bader
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2009-06-30 20:19 UTC (permalink / raw)
To: Ryan Davis; +Cc: emacs-devel
> This patch changes it to be 1 line height at the bottom of the window over
> the minibuffer much like the previous visual-bell in 22.3. 22.3 also has
> a line at the top but I didn't want to futz with the patch more than I had
> to lest it not get accepted. The patch is available at:
That sounds fairly good. I'd still expect the visual-bell to be
implemented in the generic code, but in the mean time, this looks good
to me. What do others think?
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-01 15:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-30 3:53 patch for nsterm.m to fix visual-bell Ryan Davis
2009-06-30 20:19 ` Stefan Monnier
2009-07-01 0:03 ` Miles Bader
2009-07-01 15:06 ` Stefan Monnier
2009-07-01 15:16 ` Miles Bader
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).