Re: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-07 Thread Ralf Angeli
* Eivind Midtgård (2007-05-06) writes:

 I wonder if the problem is in x_make_frame_visible in w32term.c,
 because it explicitly assumes the taskbar is at the bottom.

 /* Adjust vertical window position in order to avoid being
covered by a task bar placed at the bottom of the desktop. */

That code is not related to window maximization but to window
placement in the unmaximized state.

-- 
Ralf


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


RE: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-07 Thread Eivind Midtgård
 

 -Original Message-
 From: Eli Zaretskii [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 07, 2007 5:16 AM
 To: Eivind Midtgård
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; 
 emacs-pretest-bug@gnu.org
 Subject: Re: Maximization doesn't work properly on Windows 
 Xp,Emacs 22.0.92.1
 
 Please tell us all the details of your display setup 
 (resolution, number of colors, etc.).

Resolution: 1900 x 1200.
Color: 32 bit.
Dell Inspiron 9400 laptop.
Nvidia 7800 Go graphics card.
Nvidia desktop menu is turned off.

More?


(I have tested with resolution 1024 x 768 too).

I now compile Emacs. If you need details about some variables at certain 
places, please tell me where and I'll find them.

-- 
Eivind


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Eli Zaretskii
 Date: Sun, 06 May 2007 21:19:53 +0200
 From: Lennart Borgman (gmail) [EMAIL PROTECTED]
 Cc: emacs-pretest-bug@gnu.org
 
 The reason for the problem is that the Emacs window (frame) is not 
 really maximized on MS Windows.

That's true, but I'm not sure it's relevant.  Even if Emacs doesn't
really maximize the frame, it does try to keep away of the parts of
the screen taken by the task bar and the other standard decorations.
That it doesn't always succeed means we have a subtle bug.

To find and fix that bug, we need a reliable way of reproducing it.
If Eivind or you can provide such a reliable recipe, we will be on our
way towards fixing the bug.


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Lennart Borgman (gmail)

Eli Zaretskii wrote:

Date: Sun, 06 May 2007 21:19:53 +0200
From: Lennart Borgman (gmail) [EMAIL PROTECTED]
Cc: emacs-pretest-bug@gnu.org

The reason for the problem is that the Emacs window (frame) is not 
really maximized on MS Windows.


That's true, but I'm not sure it's relevant.  Even if Emacs doesn't
really maximize the frame, it does try to keep away of the parts of
the screen taken by the task bar and the other standard decorations.
That it doesn't always succeed means we have a subtle bug.

To find and fix that bug, we need a reliable way of reproducing it.
If Eivind or you can provide such a reliable recipe, we will be on our
way towards fixing the bug.


I thought of that in the beginning, but I believe Windows is beeing 
fooled by the way Emacs tries to make a semi-maximized window. It may be 
hard to cure it.


I think it is better to wait for an OK to really maximize the window 
from Kim and others that are experts on the display engine. The 
semi-maximized windows have other subtle problems too.


And indeed there are thousands of users who have had the possibilities 
to use the patch for really maximized windows, but I have no idea how 
many of those that are using maximized windows. It is hard to believe 
that no one has done it and there are no bug reports. Eh, or was it one 
person who had seen the same problem as I have seen? Not sure. (Of 
course it does not mean more than an indication that there are no big 
problems.)



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Eli Zaretskii
 Date: Sun, 06 May 2007 22:40:52 +0200
 From: Lennart Borgman (gmail) [EMAIL PROTECTED]
 CC:  [EMAIL PROTECTED],  emacs-pretest-bug@gnu.org
 
 I believe Windows is beeing fooled by the way Emacs tries to make a
 semi-maximized window.

How can Emacs fool Windows?  All we do is create a window; if that
window's size is too large, or it's positioned over the task bar, it's
our bug.


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Lennart Borgman (gmail)

Eli Zaretskii wrote:

Date: Sun, 06 May 2007 22:40:52 +0200
From: Lennart Borgman (gmail) [EMAIL PROTECTED]
CC:  [EMAIL PROTECTED],  emacs-pretest-bug@gnu.org

I believe Windows is beeing fooled by the way Emacs tries to make a
semi-maximized window.


How can Emacs fool Windows?  All we do is create a window; if that
window's size is too large, or it's positioned over the task bar, it's
our bug.


Ah, you are maybe right. It was quite a long time ago since I started 
using the patch so I do not remember exactly any more. I just remember 
that I was rather perplexed by the behaviour I saw. However Emacs 
somehow tells Windows that the window is maximized and that might create 
some problems since it actually is not maximized.



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


RE: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Eivind Midtgård
 

 -Original Message-
 From: Lennart Borgman (gmail) [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, May 06, 2007 10:41 PM
 To: Eli Zaretskii
 Cc: Eivind Midtgård; emacs-pretest-bug@gnu.org
 Subject: Re: Maximization doesn't work properly on Windows 
 Xp, Emacs 22.0.92.1
 
 Eli Zaretskii wrote:
  Date: Sun, 06 May 2007 21:19:53 +0200
  From: Lennart Borgman (gmail) [EMAIL PROTECTED]
  Cc: emacs-pretest-bug@gnu.org
 
  The reason for the problem is that the Emacs window (frame) is not 
  really maximized on MS Windows.
  
  That's true, but I'm not sure it's relevant.  Even if Emacs doesn't 
  really maximize the frame, it does try to keep away of the parts of 
  the screen taken by the task bar and the other standard decorations.
  That it doesn't always succeed means we have a subtle bug.
  
  To find and fix that bug, we need a reliable way of reproducing it.
  If Eivind or you can provide such a reliable recipe, we 
 will be on our 
  way towards fixing the bug.
 
 I thought of that in the beginning, but I believe Windows is 
 beeing fooled by the way Emacs tries to make a semi-maximized 
 window. It may be hard to cure it.
 
 I think it is better to wait for an OK to really maximize the 
 window from Kim and others that are experts on the display 
 engine. The semi-maximized windows have other subtle problems too.
 
 And indeed there are thousands of users who have had the 
 possibilities to use the patch for really maximized windows, 
 but I have no idea how many of those that are using maximized 
 windows. It is hard to believe that no one has done it and 
 there are no bug reports. Eh, or was it one person who had 
 seen the same problem as I have seen? Not sure. (Of course it 
 does not mean more than an indication that there are no big
 problems.)


Hi Lennart, Eli,

I have tested this a little bit more, and found that it is perfectly 
reproducible:

* Taskbar at the left (or right) of the screen, always visible.
* Maximize Emacs.
* Minimize Emacs.
* Click on the Emacs icon on the taskbar - it restores to the screen width and 
then becomes obscured by the taskbar.

Strange I've never tried this before.

I tried it now with 22.0.50.1. It worked perfectly. I must confess that my 
22.0.50.1 was downloaded bundled with EmacsW32, so maybe it's slightly 
different from your 22.0.50.1?

There is another difference too: 22.0.50.1 covers the whole desktop except for 
the taskbar. 22.0.92.1 doesn't, there are a few spare desktop pixels at the 
bottom.

I tried 23.0.0.1: It behaves like 22.0.92.1.


I wonder if the problem is in x_make_frame_visible in w32term.c, because it 
explicitly assumes the taskbar is at the bottom. 

  /* Adjust vertical window position in order to avoid being
 covered by a task bar placed at the bottom of the desktop. */
  SystemParametersInfo(SPI_GETWORKAREA, 0, workarea_rect, 0);
  GetWindowRect(FRAME_W32_WINDOW(f), window_rect);
  if (window_rect.bottom  workarea_rect.bottom
   window_rect.top  workarea_rect.top)
f-top_pos = max (window_rect.top
  - window_rect.bottom + workarea_rect.bottom,
  workarea_rect.top);

  x_set_offset (f, f-left_pos, f-top_pos, 0);


I have never been able to compile Emacs (msvc), so I can't verify it. 


Regards, 
Eivind


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Jason Rumney

Eivind Midtgård wrote:

In GNU Emacs 22.0.92.1 (i386-mingw-nt5.1.2600)
 of 2007-01-01 on DTOP
  
Please try the latest pretest before reporting bugs in old unreleased 
versions.





___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


RE: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Eivind Midtgård
 

 -Original Message-
 From: Lennart Borgman (gmail) [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, May 06, 2007 11:13 PM
 To: Eli Zaretskii
 Cc: Eivind Midtgård; emacs-pretest-bug@gnu.org
 Subject: Re: Maximization doesn't work properly on Windows 
 Xp, Emacs 22.0.92.1
 
 Eli Zaretskii wrote:
  Date: Sun, 06 May 2007 22:40:52 +0200
  From: Lennart Borgman (gmail) [EMAIL PROTECTED]
  CC:  [EMAIL PROTECTED],  emacs-pretest-bug@gnu.org
 
  I believe Windows is beeing fooled by the way Emacs tries 
 to make a 
  semi-maximized window.
  
  How can Emacs fool Windows?  All we do is create a window; if that 
  window's size is too large, or it's positioned over the 
 task bar, it's 
  our bug.
 
 Ah, you are maybe right. It was quite a long time ago since I 
 started using the patch so I do not remember exactly any 
 more. I just remember that I was rather perplexed by the 
 behaviour I saw. However Emacs somehow tells Windows that the 
 window is maximized and that might create some problems since 
 it actually is not maximized.


The Win32 documentation for ShowWindow says that SW_SHOWNORMAL is to be used 
when an app displays the window for the first time. SW_RESTORE is to be used 
when an app restores a minimized window. Since SW_RESTORE is #defined as 9, and 
SW_SHOWNORMAL is 1, I guess that Windows distinguishes between the two in some 
subtle way. 

MFC uses this for its frame windows:

if (!IsWindowVisible())
nCmdShow = SW_SHOWNORMAL;
else if (IsIconic())
nCmdShow = SW_RESTORE;


Regards,
Eivind


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Lennart Borgman (gmail)

Jason Rumney wrote:

Eivind Midtgård wrote:

In GNU Emacs 22.0.92.1 (i386-mingw-nt5.1.2600)
 of 2007-01-01 on DTOP
  
Please try the latest pretest before reporting bugs in old unreleased 
versions.



I just tried the latest pretest (unpatched) and indeed AFAICS Emacs now 
behave as it should with a maximized window, at least on Windows XP.


That is very nice! When was that change made? Or is there no change? 
(And what about Kim's note?) Last time I tested this I was using NT and 
then Emacs did not handle maximized windows very good.



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


RE: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Eivind Midtgård
 

 -Original Message-
 From: Lennart Borgman (gmail) [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 07, 2007 12:08 AM
 To: Jason Rumney
 Cc: Eivind Midtgård; emacs-pretest-bug@gnu.org
 Subject: Re: Maximization doesn't work properly on Windows 
 Xp, Emacs 22.0.92.1
 
 Jason Rumney wrote:
  Eivind Midtgård wrote:
  In GNU Emacs 22.0.92.1 (i386-mingw-nt5.1.2600)  of 
 2007-01-01 on DTOP

  Please try the latest pretest before reporting bugs in old 
 unreleased 
  versions.

Yes, I'm sorry.

 
 
 I just tried the latest pretest (unpatched) and indeed AFAICS 
 Emacs now behave as it should with a maximized window, at 
 least on Windows XP.
 
 That is very nice! When was that change made? Or is there no change? 
 (And what about Kim's note?) Last time I tested this I was 
 using NT and then Emacs did not handle maximized windows very good.


I just tried 22.0.97.1, which I believe is the latest pretest, and it still 
doesn't work on my computer. Same behaviour as in 22.0.92.1.


Regards,
Eivind


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Jason Rumney

Lennart Borgman (gmail) wrote:
I just tried the latest pretest (unpatched) and indeed AFAICS Emacs 
now behave as it should with a maximized window, at least on Windows XP.


That is very nice! When was that change made? 


Apparently there is no such change, as Eivind can still reproduce the 
bug. So we need to find what is required to reproduce it, beyond simply 
moving the taskbar to the left of the screen, as neither I nor Lennart 
can reproduce it by that simple recipe.




___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Lennart Borgman (gmail)

Jason Rumney wrote:

Lennart Borgman (gmail) wrote:
I just tried the latest pretest (unpatched) and indeed AFAICS Emacs 
now behave as it should with a maximized window, at least on Windows XP.


That is very nice! When was that change made? 


Apparently there is no such change, as Eivind can still reproduce the 
bug. So we need to find what is required to reproduce it, beyond simply 
moving the taskbar to the left of the screen, as neither I nor Lennart 
can reproduce it by that simple recipe.


Hm. Yes, I wonder what is going on. I am more surprised by that it works 
for me now than that it does not work for Eivind.


Eivind, what version of Windows are you using?

I remember one other symptom of the semi-maximized Emacs window at the 
moment: I could move the maximized window (I can't do that now). Can you 
move the maximized window, Eivind?



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


RE: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Eivind Midtgård
 

 -Original Message-
 From: Lennart Borgman (gmail) [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 07, 2007 1:23 AM
 To: Jason Rumney
 Cc: Eivind Midtgård; emacs-pretest-bug@gnu.org
 Subject: Re: Maximization doesn't work properly on Windows 
 Xp, Emacs 22.0.92.1

 
 Hm. Yes, I wonder what is going on. I am more surprised by 
 that it works for me now than that it does not work for Eivind.
 
 Eivind, what version of Windows are you using?

Windows XP SP2, Norwegian.

 
 I remember one other symptom of the semi-maximized Emacs 
 window at the
 moment: I could move the maximized window (I can't do that 
 now). Can you move the maximized window, Eivind?

Yes! 


Regards,
Eivind


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Maximization doesn't work properly on Windows Xp, Emacs 22.0.92.1

2007-05-06 Thread Eli Zaretskii
 Date: Mon, 7 May 2007 01:44:52 +0200
 From: =?iso-8859-1?Q?Eivind_Midtg=E5rd?= [EMAIL PROTECTED]
 Cc: emacs-pretest-bug@gnu.org
 
 Windows XP SP2, Norwegian.
 
  
  I remember one other symptom of the semi-maximized Emacs 
  window at the
  moment: I could move the maximized window (I can't do that 
  now). Can you move the maximized window, Eivind?
 
 Yes! 

Please tell us all the details of your display setup (resolution,
number of colors, etc.).


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug