Mercurial > emacs
diff src/xterm.c @ 112099:a71f37cebb55
Merge changes from emacs-23 branch
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 02 Jan 2011 15:31:19 -0500 |
parents | 40af77a50adc |
children | 417b1e4d63cd 7df2e30d72ec |
line wrap: on
line diff
--- a/src/xterm.c Sun Jan 02 11:23:02 2011 +0000 +++ b/src/xterm.c Sun Jan 02 15:31:19 2011 -0500 @@ -8612,9 +8612,13 @@ if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window) return; /* Only fullscreen without WM or with EWM hints (above). */ + /* Setting fullscreen to nil doesn't do anything. We could save the + last non-fullscreen size and restore it, but it seems like a + lot of work for this unusual case (no window manager running). */ + if (f->want_fullscreen != FULLSCREEN_NONE) { - int width = FRAME_COLS (f), height = FRAME_LINES (f); + int width = FRAME_PIXEL_WIDTH (f), height = FRAME_PIXEL_HEIGHT (f); struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); switch (f->want_fullscreen) @@ -8632,12 +8636,8 @@ height = x_display_pixel_height (dpyinfo); } - if (FRAME_COLS (f) != width || FRAME_LINES (f) != height) - { - change_frame_size (f, height, width, 0, 1, 0); - SET_FRAME_GARBAGED (f); - cancel_mouse_face (f); - } + XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), + width, height); } }