all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: grischka <grishka@gmx.de>
To: martin rudalics <rudalics@gmx.at>
Cc: 1348@emacsbugs.donarmstrong.com, jasonr@f2s.com
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	[thread overview]
Message-ID: <4936C0E6.9050200@gmx.de> (raw)
In-Reply-To: <49365CB8.5050800@gmx.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);
  }
  \f
  /* Mouse warping.  */
########################################






  reply	other threads:[~2008-12-03 17:24 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-26 21:22 bug#1348: set-frame-width and set-frame-position seem buggy on at least MSWindows grischka
2008-11-27 13:41 ` martin rudalics
2008-11-27 17:45   ` grischka
2008-11-27 19:48     ` martin rudalics
2008-11-29 19:42       ` grischka
2008-11-30  9:19         ` martin rudalics
2008-11-30 17:40           ` grischka
2008-11-30 20:02             ` martin rudalics
2008-11-30 22:04               ` grischka
2008-11-30 22:50                 ` martin rudalics
2008-11-30 23:08                   ` grischka
2008-11-30 23:54           ` jasonr
2008-12-01  7:28             ` martin rudalics
2008-12-01  8:22               ` jasonr
2008-12-01  9:34                 ` martin rudalics
2008-12-02  6:11                   ` grischka
2008-12-02  7:42                     ` jasonr
2008-12-02 14:11                       ` grischka
2008-12-02 15:54                     ` martin rudalics
2008-12-02 20:04                       ` Eli Zaretskii
2008-12-03 10:17                         ` martin rudalics
2008-12-03 18:32                           ` Eli Zaretskii
2008-12-04 18:00                             ` martin rudalics
2008-12-16 17:11                               ` grischka
2008-12-03  0:09                       ` grischka
2008-12-03 10:17                         ` martin rudalics
2008-12-03 17:24                           ` grischka [this message]
2008-12-03 21:41                             ` Stefan Monnier
2008-12-04 17:58                             ` martin rudalics
2008-12-04 23:24                               ` grischka
2008-12-05  6:20                                 ` Eli Zaretskii
2008-12-05 15:58                                   ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2008-12-03 21:43 grischka
2008-12-04  4:07 ` Eli Zaretskii
2008-11-17 15:06 grischka
2008-11-14 22:46 Themba Fletcher
2008-11-15  9:40 ` Eli Zaretskii
2008-11-15 10:04   ` Eli Zaretskii
2008-11-15 14:12     ` martin rudalics
2008-11-17 20:50   ` Themba Fletcher
2008-11-18 13:03     ` martin rudalics
2014-09-21 18:02 ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4936C0E6.9050200@gmx.de \
    --to=grishka@gmx.de \
    --cc=1348@emacsbugs.donarmstrong.com \
    --cc=jasonr@f2s.com \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.