From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#14180: PATCH Better fullscreen frame support on Windows Date: Sat, 13 Apr 2013 13:09:50 +0300 Message-ID: <83fvyu91xt.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1365847808 11679 80.91.229.3 (13 Apr 2013 10:10:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Apr 2013 10:10:08 +0000 (UTC) Cc: 14180@debbugs.gnu.org To: Erik Charlebois Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 13 12:10:11 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UQxPO-0003lq-7Q for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Apr 2013 12:10:10 +0200 Original-Received: from localhost ([::1]:53420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQxPN-0006st-Ht for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Apr 2013 06:10:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQxPJ-0006r7-69 for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2013 06:10:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQxPH-00008U-4P for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2013 06:10:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQxPH-00006a-0R for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2013 06:10:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UQxT8-0004fp-97 for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2013 06:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Apr 2013 10:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14180 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: patch Original-Received: via spool by 14180-submit@debbugs.gnu.org id=B14180.136584803017938 (code B ref 14180); Sat, 13 Apr 2013 10:14:02 +0000 Original-Received: (at 14180) by debbugs.gnu.org; 13 Apr 2013 10:13:50 +0000 Original-Received: from localhost ([127.0.0.1]:48444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQxSw-0004fH-4w for submit@debbugs.gnu.org; Sat, 13 Apr 2013 06:13:50 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:59160) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQxSt-0004f4-DC for 14180@debbugs.gnu.org; Sat, 13 Apr 2013 06:13:48 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0ML600500UHSZC00@a-mtaout20.012.net.il> for 14180@debbugs.gnu.org; Sat, 13 Apr 2013 13:09:46 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0ML60052VUWAGHF0@a-mtaout20.012.net.il>; Sat, 13 Apr 2013 13:09:46 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73374 Archived-At: > Date: Thu, 11 Apr 2013 00:59:54 -0400 > From: Erik Charlebois > > This change improves the 'fullscreen' frame support on Windows. When > going to fullscreen, the frame gets fullscreened with no window > decorations (which causes the Windows task bar to also disappear) on > the nearest monitor. Thank you for doing this. Jan, does the fullscreen functionality on X also maximizes the frame to one of the monitors, when several monitors are available? I don't want to introduce differences in behavior here. > The old fullscreen functionality was actually 'maximize' behavior so > I've moved that to 'maximize'. Sorry, I don't understand. The value of the 'fullscreen' frame parameter can be either 'maximize' or 'fullboth' (the latter also has a confusing alias 'fullscreen'). The current trunk code handles both, and it does so in accordance with the documentation (the last sentence below): `fullscreen' Specify that width, height or both shall be maximized. The value `fullwidth' specifies that width shall be as wide as possible. The value `fullheight' specifies that height shall be as tall as possible. The value `fullboth' specifies that both the width and the height shall be set to the size of the screen. The value `maximized' specifies that the frame shall be maximized. The difference between `maximized' and `fullboth' is that the former can still be resized by dragging window manager decorations with the mouse, while the latter really covers the whole screen and does not allow resizing by mouse dragging. It looks like your patch swaps the meaning of 'fullboth' and 'maximize', so that Emacs on MS-Windows will behave differently from its behavior on other platforms. Is my understanding correct? If so, please don't make that swap, it is wrong. > 'fullwidth' and 'fullheight' are now ignored because they were buggy > (at least in Windows 8, they were not being sized correctly) and are > not common Windows idioms. Please don't ignore these two values. They do work reasonably well on XP and on Windows 7. If they are buggy and/or don't work on Windows 8, let's fix them if we can, and leave them as they are if we can't fix them. Removing them is too drastic, IMO; I see no justification for that. > While they could be supported, I'd do it as follow on work and get > it working right on multiple monitors as well. Thanks, but in the meantime please don't remove the current code that attempts to support these two values. > I've modified the response to WM_WINDOWPOSCHANGED to do nothing when > the frame is fullscreen. Otherwise, the size gets tuned to a > multiple of the character cells and the fullscreen isn't perfectly > matching the screen. When this happens, Windows' special behavior to > hide the taskbar doesn't kick in. During debugging the new code, I saw that w32_fullscreen_hook is called with f->want_fullscreen set to the value FULLSCREEN_WAIT; I'm not sure your code expects that value and/or handles it correctly. Please double-check that. > (I signed the FSF copyright assignment papers in January so I'm ok on that > front.) Unfortunately, the FSF records still don't reflect your assignment, as of this writing. Could you please write to the FSF clerk with whom you were in touch, and ask him to expedite the update? Thanks. A few comments about your patch: > 2013-04-11 Erik Charlebois > > * src/w32fns.c (monitor_from_window_fn): New Windows API import. > (w32_monitor_rect): New function to get nearest monitor rect. > * src/w32term.c (w32_fullscreen_hook): Renamed from w32fullscreen_hook > for consistency. Rewritten for improved fullscreen support. Please leave 2 spaces after a period that ends a sentence (we use the US conventions in ChangeLogs and in the docs.) Also, please don't rename w32fullscreen_hook, I see no reason for consistency in naming functions that are private to the w32 build. > +void > +w32_monitor_rect (struct frame *f, RECT *rect) > +{ > +#ifdef HAVE_WINDOW_SYSTEM > + if (f) > + { > + /* If multiple monitor support is available, make the window > + fullscreen on the appropriate screen. */ ^ Two spaces here. Also, is there really a reason for the ifdef? I don't think this code could possibly be called in a -nw session, could it?