emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/src frame.c


From: Jan Djärv
Subject: [Emacs-diffs] emacs/src frame.c
Date: Fri, 27 Mar 2009 18:30:56 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Jan Djärv <jhd> 09/03/27 18:30:56

Modified files:
        src            : frame.c 

Log message:
        (x_set_font): If the fullscreen property is non-nil, adjust
        lines and columns so we keep the same pixel height and width.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/frame.c?cvsroot=emacs&r1=1.412&r2=1.413

Patches:
Index: frame.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/frame.c,v
retrieving revision 1.412
retrieving revision 1.413
diff -u -b -r1.412 -r1.413
--- frame.c     19 Mar 2009 06:50:55 -0000      1.412
+++ frame.c     27 Mar 2009 18:30:55 -0000      1.413
@@ -3422,7 +3422,25 @@
 
   if (! NILP (Fequal (font_object, oldval)))
     return;
+
+  
+  Lisp_Object lval = Fassq (Qfullscreen, f->param_alist);
+  if (CONSP (lval)) lval = CDR (lval);
+
   x_new_font (f, font_object, fontset);
+  /* If the fullscreen property is non-nil, adjust lines and columns so we
+     keep the same pixel height and width.  */
+  if (! NILP (lval))
+    {
+      int height = FRAME_LINES (f), width = FRAME_COLS (f);
+      if (EQ (lval, Qfullboth) || EQ (lval, Qfullwidth))
+        width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, FRAME_PIXEL_WIDTH (f));
+      if (EQ (lval, Qfullboth) || EQ (lval, Qfullheight))
+        height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, FRAME_PIXEL_HEIGHT (f));
+      
+      change_frame_size (f, height, width, 0, 0, 1);
+    }
+
   store_frame_param (f, Qfont, arg);
   /* Recalculate toolbar height.  */
   f->n_tool_bar_rows = 0;




reply via email to

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