unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Dani Moncayo <dmoncayo@gmail.com>
Cc: 16340@debbugs.gnu.org
Subject: bug#16340: 24.3.50; Maximize to the left/right side of the screen (on Windows 7 & 8)
Date: Tue, 07 Jan 2014 11:18:55 +0100	[thread overview]
Message-ID: <52CBD48F.20809@gmx.at> (raw)
In-Reply-To: <CAH8Pv0gvap+oYJhBCKm3mZFx0Ge4FUfRh8GQmG4Yg=Ky2E+_xA@mail.gmail.com>

 > But with 'frame-resize-pixelwise' set to 'nil', a maximized Emacs
 > frame takes up the whole "available" screen (except the taskbar),
 > without letting any gaps anywhere.

By accident only, I suppose.  Some of my Debian builds seem to resist
fully maximizing the frame unless `frame-resize-pixelwise' is set.  And
bug#16379 seems to confirm such behavior for Windows as well.

 > That's why I expected "maximize to
 > left/right" to also take the whole left/right half of the available
 > screen (without gaps).

It's the call

	      GetClientRect (msg.msg.hwnd, &rect);

on line 4718 of w32term.c that counts here.  Whatever Windows asks us is
what Emacs processes here.  And IIUC (from my experience and what you
told me) Windows sends us non-size-hint-truncated coordinates for a full
maximization request and size-hint-truncated coordinates for a
left/right maximization request.

 > But I think that the key difference, which I didn't understand until
 > now, may be that "maximize to left/right" (unlike the standard
 > "maximize") aren't "states" of a window, i.e. the OS simply tries to
 > resize and relocate the window to occupy the corresponding half of the
 > screen.

I believe that what we see here is an internal hack of Windows.  That
is, internally, the Aero (or what it is called) part of Windows
maintains the left/right maximized state separate.  You should be able
to verify this by increasing/removing the taskbar or whatever you have
near the Emacs frame.  If the Emacs frame adapts to the change, we know
that Aero/Windows tracks its state.  In any case it seems that Windows
does not communicate that state to the application, probably so because
the API doesn't provide the corresponding feature.

martin





  parent reply	other threads:[~2014-01-07 10:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-04 18:58 bug#16340: 24.3.50; Maximize to the left/right side of the screen (on Windows 7 & 8) Dani Moncayo
2014-01-05 10:37 ` martin rudalics
2014-01-06 19:34   ` Dani Moncayo
2014-01-06 19:58     ` martin rudalics
2014-01-06 20:56       ` Dani Moncayo
2014-01-06 22:03         ` martin rudalics
2014-01-06 22:16           ` Dani Moncayo
2014-01-06 23:04             ` Juanma Barranquero
2014-01-07  7:08               ` Dani Moncayo
2014-01-07 10:19                 ` martin rudalics
2014-01-07 10:19               ` martin rudalics
2014-01-07 10:18             ` martin rudalics [this message]
2014-01-07  1:10           ` Daniel Colascione
2014-01-07 10:19             ` martin rudalics
2014-01-07 13:42               ` Stephen Berman
2014-01-07 17:31                 ` martin rudalics
2014-01-07 19:50                   ` Stephen Berman
2014-01-11 10:24                     ` martin rudalics
2014-01-07 17:36             ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=52CBD48F.20809@gmx.at \
    --to=rudalics@gmx.at \
    --cc=16340@debbugs.gnu.org \
    --cc=dmoncayo@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).