[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -fs hides part of Emacs window behind task bar on w32
From: |
Juanma Barranquero |
Subject: |
Re: -fs hides part of Emacs window behind task bar on w32 |
Date: |
Tue, 12 Dec 2006 18:37:21 +0100 |
On 12/11/06, Lennart Borgman <address@hidden> wrote:
When starting with
emacs -Q -fs
the lower part of Emacs may get hidden behind the MS Windows task bar.
The following patch should fix that.
/L/e/k/t/u
Index: src/frame.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/frame.c,v
retrieving revision 1.335
diff -u -2 -r1.335 frame.c
--- src/frame.c 10 Nov 2006 07:54:22 -0000 1.335
+++ src/frame.c 12 Dec 2006 17:32:17 -0000
@@ -2614,4 +2614,9 @@
int newwidth = FRAME_COLS (f);
int newheight = FRAME_LINES (f);
+#ifdef HAVE_NTGUI
+ RECT work_area;
+
+ SystemParametersInfo (SPI_GETWORKAREA, 0, &work_area, 0);
+#endif
*top_pos = f->top_pos;
@@ -2623,4 +2628,7 @@
ph = FRAME_X_DISPLAY_INFO (f)->height;
+#ifdef HAVE_NTGUI
+ ph = min (ph, work_area.bottom - work_area.top);
+#endif
newheight = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, ph);
ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, newheight) - f->y_pixels_diff;
@@ -2634,4 +2642,7 @@
pw = FRAME_X_DISPLAY_INFO (f)->width;
+#ifdef HAVE_NTGUI
+ pw = min (pw, work_area.right - work_area.left);
+#endif
newwidth = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pw);
pw = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, newwidth) - f->x_pixels_diff;