Re: -fs hides part of Emacs window behind task bar on w32

2006-12-13 Thread Juanma Barranquero

On 12/12/06, Juanma Barranquero [EMAIL PROTECTED] wrote:

Any objection then to this patch? It fixes the bug that, on Windows,
emacs -Q -fs creates an initial frame partially hidden behind the
taskbar.

The patch does not take into account multiple monitors, because
neither does the original code: it sets *top_pos = 0 and *left_pos =
0, and Windows virtual coordinate (0, 0) is always contained in the
primary monitor.

 /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 -  1.335
+++ src/frame.c 12 Dec 2006 17:32:17 -
@@ -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;


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: -fs hides part of Emacs window behind task bar on w32

2006-12-12 Thread Juanma Barranquero

On 12/11/06, Lennart Borgman [EMAIL PROTECTED] 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 -  1.335
+++ src/frame.c 12 Dec 2006 17:32:17 -
@@ -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;


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


-fs hides part of Emacs window behind task bar on w32

2006-12-11 Thread Lennart Borgman

When starting with

  emacs -Q -fs

the lower part of Emacs may get hidden behind the MS Windows task bar. 
This happens because Emacs window is not really maximized. Unfortunately 
this means that Emacs' minibuffer is not visible.



In GNU Emacs 22.0.91.1 (i386-mingw-nt5.1.2600)
of 2006-12-10
X server distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Id:/g/include'



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug