From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: grischka Newsgroups: gmane.emacs.bugs Subject: bug#1348: set-frame-width and set-frame-position seem buggy on at least MSWindows Date: Wed, 03 Dec 2008 18:24:54 +0100 Message-ID: <4936C0E6.9050200@gmx.de> References: 4922BD1F.2080604@gmx.at <492DBE0C.1030707@gmx.de> <492EA390.1020206@gmx.at> <492EDCC9.7070806@gmx.de> <492EF976.1070108@gmx.at> <49319B2E.20006@gmx.de> <49325AAA.5090606@gmx.at> <1228089264.493327b06fd4e@webmail.freedom2surf.net> <49339200.7080603@gmx.at> <1228119737.49339eb964cc6@webmail.freedom2surf.net> <4933AFA5.5020109@gmx.at> <4934D1AF.50905@gmx.de> <49355A23.8030001@gmx.at> <4935CE37.4010206@gmx.de> <49365CB8.5050800@gmx.at> Reply-To: grischka , 1348@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1228326668 19867 80.91.229.12 (3 Dec 2008 17:51:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2008 17:51:08 +0000 (UTC) Cc: 1348@emacsbugs.donarmstrong.com, jasonr@f2s.com To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 03 18:52:10 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L7vsv-0002PM-AQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Dec 2008 18:51:37 +0100 Original-Received: from localhost ([127.0.0.1]:33992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7vrk-00072g-Mj for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Dec 2008 12:50:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7vrf-00072A-33 for bug-gnu-emacs@gnu.org; Wed, 03 Dec 2008 12:50:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7vrd-00071e-F7 for bug-gnu-emacs@gnu.org; Wed, 03 Dec 2008 12:50:18 -0500 Original-Received: from [199.232.76.173] (port=46021 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7vrd-00071b-Aq for bug-gnu-emacs@gnu.org; Wed, 03 Dec 2008 12:50:17 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:60974) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L7vrc-0001Nl-O3 for bug-gnu-emacs@gnu.org; Wed, 03 Dec 2008 12:50:17 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB3HoDgi028160; Wed, 3 Dec 2008 09:50:13 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mB3HZ38a023952; Wed, 3 Dec 2008 09:35:03 -0800 X-Loop: don@donarmstrong.com Resent-From: grischka Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 03 Dec 2008 17:35:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1348 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1348-submit@emacsbugs.donarmstrong.com id=B1348.122832512522630 (code B ref 1348); Wed, 03 Dec 2008 17:35:03 +0000 Original-Received: (at 1348) by emacsbugs.donarmstrong.com; 3 Dec 2008 17:25:25 +0000 Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mB3HPKb6022271 for <1348@emacsbugs.donarmstrong.com>; Wed, 3 Dec 2008 09:25:22 -0800 Original-Received: (qmail invoked by alias); 03 Dec 2008 17:25:13 -0000 Original-Received: from 1Cust219.tnt4.ber2.deu.da.uu.net (EHLO [149.225.58.219]) [149.225.58.219] by mail.gmx.net (mp052) with SMTP; 03 Dec 2008 18:25:13 +0100 X-Authenticated: #18588216 X-Provags-ID: V01U2FsdGVkX18G5itL7HMGWoXbkFa83+AabGp55N2sh4UK8jIdI6 xekxdirt51bZKg User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) In-Reply-To: <49365CB8.5050800@gmx.at> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.48 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 03 Dec 2008 12:50:18 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:22915 Archived-At: martin rudalics wrote: > > Actually -100 doesn't mean anything except to let the "async_visible" > > flag alone, because otherwise no frame showed at all, for some reason. > > But your patch skips more than just the async_visible assignments. Saved me one line to type. Anyway, I found the reason: case SIZE_MAXIMIZED: case SIZE_RESTORED: f->async_visible = 1; Basically RESTORED or MAXIMIZED don't necessarily mean visible in the windows sense. I replaced it with f->async_visible = IsWindowVisible(msg.msg.hwnd) ? 1 : 0; I also replaced w32_read_socket() by a less suspicious looking gobble_input (0); I'm not so into emacs internals to tell whether this is the finally ideal function to use. You might know better. > >> - if a non-size-related request is in the queue we'd honor it - even it > >> has some of our code re-resize frames? > >> > > Sure, as always. > > Not really, because the current code doesn't call w32_read_socket until > input gets unblocked. Now not sure what you meant. Probably something not good. But what? Size wrong? Events lost? Example? > >> - if there's another frame we don't care about the > >> record_asynch_buffer_change (); stuff? > >> > > What buffer change? Resize doesn't change buffers, does it? > > I suppose resizing a frame might do all sorts of nasty things like > resizing and deleting windows within the resized frame, switching > buffers, showing another menu-/tool-bar, ... Only with at least two frames? Sounds cryptic ;) > > martin > New patch: ######################################## --- w32term-old.c Mon Dec 01 17:50:28 2008 +++ w32term.c Wed Dec 03 17:39:21 2008 @@ -4533,7 +4533,7 @@ w32_read_socket (sd, expected, hold_quit case SIZE_MAXIMIZED: case SIZE_RESTORED: - f->async_visible = 1; + f->async_visible = IsWindowVisible(msg.msg.hwnd) ? 1 : 0; f->async_iconified = 0; /* wait_reading_process_output will notice this and update @@ -5384,6 +5384,7 @@ x_set_offset (f, xoff, yoff, change_grav 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); UNBLOCK_INPUT; + gobble_input (0); } @@ -5509,6 +5510,7 @@ x_set_window_size (f, change_gravity, co #endif UNBLOCK_INPUT; + gobble_input (0); } /* Mouse warping. */ ########################################