all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Minimum frame size in Windows
@ 2006-12-12 16:36 Juanma Barranquero
  2006-12-12 16:42 ` Drew Adams
  0 siblings, 1 reply; 11+ messages in thread
From: Juanma Barranquero @ 2006-12-12 16:36 UTC (permalink / raw)


There's an old hack in src/w32fns.c to avoid the user resizing an
Emacs frame below the minimum tracking size (else the user can, for
example, make a window showing only a fraction of the window caption,
which looks ugly).

However, the hack is not working. I propose fixing it with the
following straightforward patch.

                    /L/e/k/t/u


Index: src/w32fns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32fns.c,v
retrieving revision 1.281
diff -u -2 -r1.281 w32fns.c
--- src/w32fns.c	1 Dec 2006 13:04:59 -0000	1.281
+++ src/w32fns.c	12 Dec 2006 16:18:44 -0000
@@ -3707,6 +3707,6 @@
 		   and Y positions as well.  */

-		lppos->cx -= wdiff;
-		lppos->cy -= hdiff;
+		lppos->cx = max (lppos->cx - wdiff, GetSystemMetrics (SM_CXMINTRACK));
+		lppos->cy = max (lppos->cy - hdiff, GetSystemMetrics (SM_CYMINTRACK));

  		if (wp.showCmd != SW_SHOWMAXIMIZED
@@ -3732,7 +3732,4 @@

     case WM_GETMINMAXINFO:
-      /* Hack to correct bug that allows Emacs frames to be resized
-	 below the Minimum Tracking Size.  */
-      ((LPMINMAXINFO) lParam)->ptMinTrackSize.y++;
       /* Hack to allow resizing the Emacs frame above the screen size.
 	 Note that Windows 9x limits coordinates to 16-bits.  */

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-12-12 22:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-12 16:36 Minimum frame size in Windows Juanma Barranquero
2006-12-12 16:42 ` Drew Adams
2006-12-12 17:14   ` Lennart Borgman
2006-12-12 17:22   ` Juanma Barranquero
2006-12-12 17:56     ` Drew Adams
2006-12-12 19:39       ` Juanma Barranquero
2006-12-12 21:37         ` Drew Adams
2006-12-12 21:54           ` Juanma Barranquero
2006-12-12 22:14           ` Juanma Barranquero
2006-12-12 22:26             ` Drew Adams
2006-12-12 22:34               ` Juanma Barranquero

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.