From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: Full screen mode on windows Date: Sat, 31 May 2008 14:53:58 +0200 Message-ID: References: <871w3ik9js.fsf@kanis.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1212238740 16215 80.91.229.12 (31 May 2008 12:59:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 May 2008 12:59:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ivan Kanis Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 31 14:59:40 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 1K2QgM-0006fX-B4 for ged-emacs-devel@m.gmane.org; Sat, 31 May 2008 14:59:38 +0200 Original-Received: from localhost ([127.0.0.1]:34194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2Qfa-0005RF-MO for ged-emacs-devel@m.gmane.org; Sat, 31 May 2008 08:58:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K2QfV-0005RA-Kc for emacs-devel@gnu.org; Sat, 31 May 2008 08:58:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K2QfU-0005Qr-7j for emacs-devel@gnu.org; Sat, 31 May 2008 08:58:45 -0400 Original-Received: from [199.232.76.173] (port=58715 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2QfU-0005Qo-45 for emacs-devel@gnu.org; Sat, 31 May 2008 08:58:44 -0400 Original-Received: from iwfs.imcode.com ([82.115.149.64]:51204 helo=gate.verona.se) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K2QfT-0005rj-H2 for emacs-devel@gnu.org; Sat, 31 May 2008 08:58:43 -0400 Original-Received: from chopper (IDENT:1005@localhost [127.0.0.1]) by gate.verona.se (8.13.4/8.11.4) with ESMTP id m4VCwdf8016844; Sat, 31 May 2008 14:58:39 +0200 In-Reply-To: <871w3ik9js.fsf@kanis.fr> (Ivan Kanis's message of "Sat, 31 May 2008 13:16:55 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:98129 Archived-At: I would suggest looking at the existing fullscreen option for X: (set-frame-parameter nil 'fullscreen 'fullboth) and make that work for w32, if it doesnt already! Ivan Kanis writes: > Hello, > > There is nice feature in Putty called full screen mode. It takes away > all windows decoration including the taskbar. > > I would like to implement this feature natively on emacs. I have two > ideas for the api: > > 1) Either I make a function called w32-toggle-fullscreen and do all > the right thing in C, > > 2) Or I could expose the GetWindowLongPtr, SetWindowLongPtr and > SetWindowPos as lisp function and write the toggle in lisp. > > Which approach is the most likely to get included? > > For info here is the Putty code that does the job : > > /* Remove the window furniture. */ > style = GetWindowLongPtr(hwnd, GWL_STYLE); > style &= ~(WS_CAPTION | WS_BORDER | WS_THICKFRAME); > if (cfg.scrollbar_in_fullscreen) > style |= WS_VSCROLL; > else > style &= ~WS_VSCROLL; > SetWindowLongPtr(hwnd, GWL_STYLE, style); > > /* Resize ourselves to exactly cover the nearest monitor. */ > get_fullscreen_rect(&ss); > SetWindowPos(hwnd, HWND_TOP, ss.left, ss.top, > ss.right - ss.left, > ss.bottom - ss.top, > SWP_FRAMECHANGED); > > Thanks for your feedbacks. -- Joakim Verona