emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch for nsterm.m to fix visual-bell


From: Ryan Davis
Subject: patch for nsterm.m to fix visual-bell
Date: Mon, 29 Jun 2009 20:53:23 -0700

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]];





reply via email to

[Prev in Thread] Current Thread [Next in Thread]