summaryrefslogtreecommitdiff
path: root/src/nsterm.m
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2013-12-05 17:20:11 +0100
committerJan Djärv <jan.h.d@swipnet.se>2013-12-05 17:20:11 +0100
commitc619527c15d2c0c88d5e73f102588f6c3d44ab73 (patch)
tree4e0e565e4f0e06a5d900c8be3ab4126c438f1f09 /src/nsterm.m
parentff69c18f0ce65fab24d439b390d5215fcd89d0ae (diff)
downloademacs-c619527c15d2c0c88d5e73f102588f6c3d44ab73.tar.gz
Fix some pixelwise breakage, more remain.
* nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width. * nsterm.m (x_set_window_size): Handle pixelwise.
Diffstat (limited to 'src/nsterm.m')
-rw-r--r--src/nsterm.m16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index e58ac9b9277..3e6ceae6580 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1258,7 +1258,7 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows, bool pi
if (view == nil)
return;
-/*fprintf (stderr, "\tsetWindowSize: %d x %d, font size %d x %d\n", cols, rows, FRAME_COLUMN_WIDTH (f), FRAME_LINE_HEIGHT (f)); */
+/*fprintf (stderr, "\tsetWindowSize: %d x %d, pixelwise %d, font size %d x %d\n", cols, rows, pixelwise, FRAME_COLUMN_WIDTH (f), FRAME_LINE_HEIGHT (f));*/
block_input ();
@@ -1267,8 +1267,18 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows, bool pi
f->scroll_bar_actual_width = NS_SCROLL_BAR_WIDTH (f);
compute_fringe_widths (f, 0);
- pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, cols);
- pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows);
+ if (pixelwise)
+ {
+ pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, cols);
+ pixelheight = FRAME_TEXT_TO_PIXEL_HEIGHT (f, rows);
+ cols = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixelwidth);
+ rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixelheight);
+ }
+ else
+ {
+ pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, cols);
+ pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows);
+ }
/* If we have a toolbar, take its height into account. */
if (tb && ! [view isFullscreen])