[Y-devel] minimize patch (sortof) and what is needed to get it right
Ramon Medina rmedina at rochester.rr.com
Fri Feb 20 17:24:35 GMT 2004
This is why we should come up with some design ideas so we know how we want
things to interact. I'm afraid that features will be implemented in the
wrong place and tangle things up if we don't.
A better way to submit patches would be nice too.
On Friday 20 February 2004 12:02 pm, you wrote:
> Hello. I was reading through code and decided to write a patch to support
> minimizing windows. This was partially just my way of getting used to the
> source code (although i still have a long way to go), but it is also a
> feature that needs to be implemented eventually.
>
> Currently this does not actually hide windows, but instead "shades" them
> (makes them only display their title bars), but all the hooks to do actual
> minimizing are in there. In this case even that doesnt happen perfectly,
> because the widgetResize() function keeps the minimum height to large for
> the display to look quite right.
>
> I have also changed some code that assumed that the only valid values of
> WindowSizeState were WINDOW_SIZE_NORMAL and WINDOW_SIZE_MAXIMISE
> (ie, they check for WINDOW_SIZE_NORMAL and if it isnt, they assume it is
> maximized). I also added a WINDOW_SIZE_MINIMIZE value to the enum.
>
> There were two reasons i did not actually implement minimizing: first, the
> desktop has no way of hiding/showing windows, it can only remove them.
> based on the current code, it looks like there are two easy ways to
> implement this, either with a flag in the window class to set whether it is
> hidden or not, or by implementing a separate list of "hidden windows" in
> the desktop class and have show/hide move the windows between the lists (i
> prefer this second way myself). This would certainly make showing/hiding
> windows slower, but drawing windows would operate faster, which is, imho,
> the better place to put the speedup.
>
> The second reason i did not implement actual window minimizing is that
> there is currently no GUI available to unminimize the window. presumably
> this would be done in some sort of taskbar (a. la. windows), a desktop
> mouse menu (*box) or even desktop icons (twm, etc). This got me to
> thinking about how and where a person would implement this feature. In the
> X environment this would be done in the window manager, but since the
> window manager is just another module in Y, perhaps it would be better to
> make a "task manager" module, which the user could swap in and out, and,
> presumably, a window manager module could also implement a task manager
> module and provide both functionalities.
>
> anyway, here, finally, is the patch
>
> Thomas Stephens
> spiralman at softhome.net
>
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved