emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal for a new API to fullscreen


From: Lennart Borgman (gmail)
Subject: Re: Proposal for a new API to fullscreen
Date: Tue, 19 Aug 2008 15:40:40 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Ivan Kanis wrote:
> "Lennart Borgman (gmail)" <address@hidden> writes:
> 
>> There is a patch for maximizing windows in Emacs+EmacsW32 that have been
>> used for some years now.
> 
> Hi Lennart, could you point me to that patch? It looks like I have
> duplicated work.

It was a long time ago I wrote it, it is intermingled with other patches
 now. It aught to be these parts:

Index: src/w32fns.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32fns.c,v
retrieving revision 1.345
diff -b -u -r1.345 w32fns.c
--- src/w32fns.c        1 Aug 2008 11:48:29 -0000       1.345
+++ src/w32fns.c        2 Aug 2008 08:54:15 -0000

@@ -3737,15 +4240,17 @@
                   However for top/left sizing we will need to fix the X
                   and Y positions as well.  */

+
+                if (wp.showCmd != SW_SHOWMAXIMIZED
+                    && (lppos->flags & SWP_NOMOVE) == 0)
+                  {
+/*                     lppos->cx -= wdiff; */
+/*                     lppos->cy -= hdiff; */
                int cx_mintrack = GetSystemMetrics (SM_CXMINTRACK);
                int cy_mintrack = GetSystemMetrics (SM_CYMINTRACK);

                lppos->cx = max (lppos->cx - wdiff, cx_mintrack);
                lppos->cy = max (lppos->cy - hdiff, cy_mintrack);
-
-               if (wp.showCmd != SW_SHOWMAXIMIZED
-                   && (lppos->flags & SWP_NOMOVE) == 0)
-                 {
                    if (lppos->x != wr.left || lppos->y != wr.top)
                      {
                        lppos->x += wdiff;
@@ -3833,9 +4338,15 @@
     case WM_EMACS_SETWINDOWPOS:
       {
        WINDOWPOS * pos = (WINDOWPOS *) wParam;
+        if (IsZoomed(hwnd)) {
+          return SetWindowPos (hwnd, pos->hwndInsertAfter,
+                               pos->x, pos->y, pos->cx, pos->cy,
+                               pos->flags | SWP_NOMOVE | SWP_NOSIZE);
+        } else {
        return SetWindowPos (hwnd, pos->hwndInsertAfter,
                             pos->x, pos->y, pos->cx, pos->cy, pos->flags);
       }
+      }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]