This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Scrollbars patch


Harold L Hunt wrote:
Jehan <nahor@bravobrava.com> said:


Harold L Hunt wrote:


8) I added WM_MAXIMIZE to the window style when -scrollbars is passed.
This
allows one to maximize the Cygwin/XFree86 window.  However, there are a
few
problems here... such as, what is a maximized 800x600 window on a 1024x768
screen?  I dunno... try it, it is weird.
I wanted to but I can't compile for now (missing xf86openConfigFile,
xf86readConfigFile, xf86closeConfigFile at link timeand I don't have
time to look at that yet)
But, a wild guess, isn't ptMaxSize in WM_GETMINMAXINFO for that? (MSDN,
MINMAXINFO: ptMaxSize | when a window is maximized or resized, ...)

I've included a tarball with the missing files above.

We can't make ptMaxSize larger than our visual size, because we could have an
800x600 visual on a 1024x768 display... we would end up with several thousand
blank pixels if we really maximized the window.  That is the weirdness that I
was talking about.
Now that I can compile and test, here how it works.
- ptMaxSize is the maximum size of the window when you press the maximize button. In practice, when you maximzed a window, it takes the min between ptMaxSize, ptMaxTrackSize, and the Windows desktop (at least on my single monitor machine) .
- ptMaxTrackSize is the maximum size of the window when dragging a border (or using the size in the system menu).

Also, I don't think we want a bigger window than what Windows set (do we wan't the window to be bigger than the Windows (virtual) desktop?)
So I suggest that:
ptMaxSize = min (ptMaxSize, size of visual)
ptMaxTrackSize = min (ptMaxTrackSize , size of visual)


Jehan


Sort of.  On single and uni monitor displays, a maximized window is set to the
minimum of ptMaxSize, ptMaxTrackSize, and the size of the windows display area
on the current monitor.
Min(ptMaxSize, ptMaxTrackSize) seems logical (assuming that Windows is logical ;p). Why wouldn't someone be able to resize his window at least as big as the maximized one would be?.
That it trims to the desktop size. Well it make sense in a way. Image that one of your monitor is 640x480 and this other is 1024x768. The second monitor being on the size of the other (by opposition to top/bottom).
_____________
| 640 | 1024 |
|_480_| 768 |
|_______|

What is the maximized size? 640+1024 by max(480,768)? Then some part would not be visible (lower left). (640+1024) by min(480,768)? Then the lower right isn't used.

I would say then, we takes what Windows behavior and we make it more restrictive if necessary, i.e. we reduce the size if the visual is smaller that what the window would be.


Oh hell... I give up.  I don't know... we will just have to see how people
like this when I finally make a test release.  We really need someone with >1
monitors on their Windows machine to help out here...
If you can't find someone to do it, I have a system where I could test. But I prefer to avoid touching that machine as much as possible. This is a demo machine at work, I don't really want to install anything that is not necessary (and cygwin isn't).




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]