From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: Proposal for a new API to fullscreen Date: Tue, 19 Aug 2008 15:40:40 +0200 Message-ID: <48AACD58.9020403@gmail.com> References: <87wsidphul.fsf@kanis.fr> <200808191226.33688.tassilo@member.fsf.org> <200808191336.41091.tassilo@member.fsf.org> <87bpzpp655.fsf@kanis.fr> <48AAB8D5.3000905@gmail.com> <877iadf7xk.fsf@kanis.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1219153305 22521 80.91.229.12 (19 Aug 2008 13:41:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Aug 2008 13:41:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ivan Kanis Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 19 15:42:38 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KVRT5-0006m8-GQ for ged-emacs-devel@m.gmane.org; Tue, 19 Aug 2008 15:41:51 +0200 Original-Received: from localhost ([127.0.0.1]:36127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVRS8-0000nn-7c for ged-emacs-devel@m.gmane.org; Tue, 19 Aug 2008 09:40:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KVRS4-0000nh-8V for emacs-devel@gnu.org; Tue, 19 Aug 2008 09:40:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KVRS2-0000n2-GP for emacs-devel@gnu.org; Tue, 19 Aug 2008 09:40:47 -0400 Original-Received: from [199.232.76.173] (port=50440 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVRS2-0000mq-De for emacs-devel@gnu.org; Tue, 19 Aug 2008 09:40:46 -0400 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]:46281) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KVRS1-0006xt-JU for emacs-devel@gnu.org; Tue, 19 Aug 2008 09:40:46 -0400 Original-Received: from c83-254-151-176.bredband.comhem.se ([83.254.151.176]:60933 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KVRRz-0005BK-3U; Tue, 19 Aug 2008 15:40:43 +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 In-Reply-To: <877iadf7xk.fsf@kanis.fr> X-Enigmail-Version: 0.95.7 X-Antivirus: avast! (VPS 080818-0, 2008-08-18), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.176 X-Scan-Result: No virus found in message 1KVRRz-0005BK-3U. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KVRRz-0005BK-3U 9565075c21eeb0eb0f4163b192400d9f X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102657 Archived-At: Ivan Kanis wrote: > "Lennart Borgman (gmail)" 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); } + }