]> git.eshelyaron.com Git - emacs.git/commitdiff
* nsterm.m (updateFrameSize:, initFrameFromEmacs:)
authorJan Djärv <jan.h.d@swipnet.se>
Tue, 9 Sep 2014 17:46:28 +0000 (19:46 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Tue, 9 Sep 2014 17:46:28 +0000 (19:46 +0200)
(toggleFullScreen:): Take frame_resize_pixelwise into account when
setting resize increments.

Fixes: debbugs:18435
src/ChangeLog
src/nsterm.m

index 274817d82622bdd366c17d06a925fcbef50387e6..fc1f1af853b3bae70d1d7a86a69fe9017c3e836b 100644 (file)
@@ -1,3 +1,9 @@
+2014-09-09  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.m (updateFrameSize:, initFrameFromEmacs:)
+       (toggleFullScreen:): Take frame_resize_pixelwise into account when
+       setting resize increments (Bug#18435).
+
 2014-09-09  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (pos_visible_p): Properly save and restore the iterator
index 4b1ebb2b5169dfa44e9e9b2cd355014a08a52cbe..833b8e389a9a1d738dddac43acfd7ee0dac30543 100644 (file)
@@ -5821,10 +5821,13 @@ not_in_argv (NSString *arg)
 
       // Did resize increments change because of a font change?
       if (sz.width != FRAME_COLUMN_WIDTH (emacsframe) ||
-          sz.height != FRAME_LINE_HEIGHT (emacsframe))
+          sz.height != FRAME_LINE_HEIGHT (emacsframe) ||
+          (frame_resize_pixelwise && sz.width != 1))
         {
-          sz.width = FRAME_COLUMN_WIDTH (emacsframe);
-          sz.height = FRAME_LINE_HEIGHT (emacsframe);
+          sz.width = frame_resize_pixelwise
+            ? 1 : FRAME_COLUMN_WIDTH (emacsframe);
+          sz.height = frame_resize_pixelwise
+            ? 1 : FRAME_LINE_HEIGHT (emacsframe);
           [win setResizeIncrements: sz];
 
           NSTRACE_SIZE ("New size", NSMakeSize (neww, newh));
@@ -6086,8 +6089,8 @@ if (cols > 0 && rows > 0)
   [win setDelegate: self];
   [win useOptimizedDrawing: YES];
 
-  sz.width = FRAME_COLUMN_WIDTH (f);
-  sz.height = FRAME_LINE_HEIGHT (f);
+  sz.width = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
+  sz.height = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
   [win setResizeIncrements: sz];
 
   [[win contentView] addSubview: self];
@@ -6434,8 +6437,8 @@ if (cols > 0 && rows > 0)
                                  (FRAME_DEFAULT_FACE (f)),
                                  f);
 
-  sz.width = FRAME_COLUMN_WIDTH (f);
-  sz.height = FRAME_LINE_HEIGHT (f);
+  sz.width = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
+  sz.height = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
 
   if (fs_state != FULLSCREEN_BOTH)
     {