diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2010-12-24 11:14:44 +0100 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2010-12-24 11:14:44 +0100 |
commit | 84595ff0e36ef8dab302dc9104c923f5f6664a44 (patch) | |
tree | aaa85e2b98aa71ff68e53051219b703549429feb /src | |
parent | b0eab0848b5e95391d1bff5080aee6495d9a47b4 (diff) | |
download | emacs-84595ff0e36ef8dab302dc9104c923f5f6664a44.tar.gz |
* xterm.c (x_check_fullscreen): Fix pixel/character mixup.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/xterm.c | 16 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f7022e4a350..8574622c187 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-12-24 Jan Djärv <jan.h.d@swipnet.se> + + * xterm.c (x_check_fullscreen): Fix pixel/character mixup. + 2010-12-17 Eli Zaretskii <eliz@gnu.org> * xdisp.c (Fformat_mode_line): Fix last change. diff --git a/src/xterm.c b/src/xterm.c index 22019e2279b..83dd4a4d83f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8764,9 +8764,13 @@ x_check_fullscreen (f) 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) @@ -8783,13 +8787,9 @@ x_check_fullscreen (f) case FULLSCREEN_HEIGHT: 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); } } |