Proposal for 2.0.1.beta: deal with multiple monitors, iconized and maximized windows

5 messages Options
Embed this post
Permalink
Ed Musgrove

Proposal for 2.0.1.beta: deal with multiple monitors, iconized and maximized windows

Reply Threaded More More options
Print post
Permalink
Unless I get asked not to, after a bit (depending on the traffic this
gets here on the list) I would like to post this on the open forum.
Except as noted in the last paragraph, I am ready willing and able
to provide Audacity with this feature set. This code is not complex.

Proposal for Audacity 2.0.1.beta:
 
Improve the Audacity user's experience by making Audacity
more able to deal with multiple monitors and with iconized
and maximized windows.
 
Definition of terms:
 
Maximized window -- a window which covers all of a
     monitor's display, with the exception of any area devoted
     to the system' s menu (if it has one) or taskbar. It has the
     potential to be "restored down" or iconized.
Normal window -- ("restored down", "restored" and
     occasionally "minimized") a window who's size is only
     limited by the user's ability to drag it around and
     stretch it with the window sizing gadget. It can span
     multiple monitors. It has the potential to be
     "restored down" or iconized.
Iconized window -- a window who's only visual display is
     an icon in the taskbar. It has a context menu which is
     available via a right-click. It remembers its previous
     size and location to which it returns when "restored".
Main window -- an Audacity project window. If any project
     windows are non-iconized this is the one with focus.
Pixel space -- the x,y coordinate location of the top left
     and bottom right corners of a monitor's visual display.
     On any given monitor these values are relative to
     that of the main monitor, i.e. a secondary monitor
     which is positioned (as specified by the graphics card's
     software) to the left of the main monitor will have all
     x pixels be negative numbers but the y pixels might be
     positive or negative. Just as an example, given a
     secondary monitor to the left of the main monitor
     all of its x pixel values will be negative and it's y pixel
     values might be positive or negative and neither the top
     nor the bottom of its pixel space is required to line up
     with that of the main monitor.
Multiple monitors -- a computer system may have one or
     more monitors consisting of a main monitor and one or
     more secondary monitors; any given monitor might be:
     powered on, powered off, enabled, disabled or
     disconnected. Monitors may be of different pixel
     resolutions and secondary monitors may be logically
     placed (via software) anywhere surrounding the main
     monitor.
Oldest project -- that open (regardless of window state)
     Audacity project which has been opened the longest
     since this session of Audacity was launched.
Youngest project -- that open (regardless of window state)
     Audacity project which has been opened space the least
     amount of time since this session of Audacity was launched.
 
The current situation in Audacity 1.3.10.beta:
 
After my recent patch, upon exit, Audacity now deals
reasonably (though in a minimalistic way) with window
size and location when writing preferences. If Audacity exits
while at least one project window is not iconized, the size,
location and maximized state of the youngest project is stored
in preferences. If this location is not on the main monitor,
and the secondary monitor to which that location refers
is not available when Audacity relaunches, the project window
will not be visible. I would like to enhance and expand this.
 
The proposed situation for Audacity 2.0.1.beta:
 
The exit strategy:
 
Preferences should store some additional (window) information:
     Boolean -- respect secondary monitor
     Boolean -- warn if opening on secondary monitor
     Boolean -- is iconized
     wxRect -- "alternate" location and size (if iconized or
          maximized)
Upon exit, Audacity should walk backwards through the
project array (youngest to oldest) and determine if any project,
if reopened, would be completely visible on the main monitor
(i.e. non-iconized). If such a project is found it should
immediately be used as the template for storage in preferences.
Else, the "respect secondary monitor" flag should be checked;
if == NO, the array should again be walked backwards to find
the 1st project which, if reopened in "normal" (i.e.
non-iconized) state, would be completely visible on the main
monitor. If such a project is found it should immediately be
used as the template for storage in preferences (noting that we
store its iconized and maximized state).
Though, if "respect..." == NO and no project is suitable, store
the defaults (i.e. overwrite any potentially hazardous
stored preferences -- this will resolve the need to nuke the
current configuration file simply because the window values
are hosed).
If "respect..." == YES the youngest project should be used as
the preferences template (again, note that we store and respect
its iconized and maximized state).
 
The relaunch strategy:
 
Audacity should examine the "respect secondary monitor"
value and the number of available monitors. The code which
opens the Main window should ensure that the location
and size is appropriate given the value of those 2 variables
(also using something similar to the code in MetaData to
ensure that the Main window's top edge [i.e. allows dragging]
and bottom right corner [i.e. allows sizing] are visible on some
monitor). If not, the Main window should open in the default
size and position (i.e. on the main monitor). If "warn if..." ==
YES and the Main window's top edge and resizing gadget
are not visible on the main monitor issue the warning.
 
Add to the context menu of the Audacity taskbar icon:
"Normalize"
this will force the youngest project's window to assume the
default size and position on the main monitor and to become
visible (if iconized). I am not sure how to do this, but I know
that it may be done (at least on Windows).
 -Ed Musgrove


     

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Gale (Audacity Team)

Re: Proposal for 2.0.1.beta: deal with multiple monitors, iconized and maximized windows

Reply Threaded More More options
Print post
Permalink

Hi Ed,

I'm not sure what you mean by "the open forum". Were you going to
write a Wiki page about these issues?

As I said on another thread, I agree with you about storing the last
used "normal" window size; and about the need to ensure if the main
window's top edge/bottom right corner aren't visible on some monitor,
the window should open at default settings on the main monitor.

I'm still very unsure about adding Preferences for a multi-monitor
warning and whether to always launch on first monitor. I've never
seen any demands for this (which is not to say they don't exist) and
we didn't do this for the "metadata editor lost on unavailable second  
monitor problem".

I'd just as soon ensure (before 2.0 if safe to do so) that we merely
solved the worst case that John highlighted where the professor
shuts down Audacity on his laptop on the second monitor and restarts
it at home with no second monitor in existence. I'm not sure he needs
to know anything about how Audacity brings itself up correctly at home.
Yes OK, back at college I guess he has to drag Audacity over to the
second monitor again, and what you're suggesting is nice, but apart
from whether we want to use space in Preferences, are there more
pressing concerns you might be able to help us with?

Have you researched if any other audio editors have such preference
settings? I imagine pro level video editors may do?  

I wouldn't support "Normalize" in the taskbar context menu. People
would think if they understood it all that it would apply the effect of
the same name. And would it work with the huge variety of custom
window modifying tools that you can download (like the one I use to
add pin and roll-up features, with extra buttons and context menu
items)?      

Thanks for all the thought you've put into this so far.




Gale




| From Ed Musgrove <[hidden email]>
| Tue, 6 Oct 2009 17:46:16 -0700 (PDT)
| Subject: [Audacity-devel] Proposal for 2.0.1.beta: deal with multiple monitors, iconized and maximized windows

> Unless I get asked not to, after a bit (depending on the traffic this
> gets here on the list) I would like to post this on the open forum.
> Except as noted in the last paragraph, I am ready willing and able
> to provide Audacity with this feature set. This code is not complex.
>
> Proposal for Audacity 2.0.1.beta:
>  
> Improve the Audacity user's experience by making Audacity
> more able to deal with multiple monitors and with iconized
> and maximized windows.
>  
> Definition of terms:
>  
> Maximized window -- a window which covers all of a
>      monitor's display, with the exception of any area devoted
>      to the system' s menu (if it has one) or taskbar. It has the
>      potential to be "restored down" or iconized.
> Normal window -- ("restored down", "restored" and
>      occasionally "minimized") a window who's size is only
>      limited by the user's ability to drag it around and
>      stretch it with the window sizing gadget. It can span
>      multiple monitors. It has the potential to be
>      "restored down" or iconized.
> Iconized window -- a window who's only visual display is
>      an icon in the taskbar. It has a context menu which is
>      available via a right-click. It remembers its previous
>      size and location to which it returns when "restored".
> Main window -- an Audacity project window. If any project
>      windows are non-iconized this is the one with focus.
> Pixel space -- the x,y coordinate location of the top left
>      and bottom right corners of a monitor's visual display.
>      On any given monitor these values are relative to
>      that of the main monitor, i.e. a secondary monitor
>      which is positioned (as specified by the graphics card's
>      software) to the left of the main monitor will have all
>      x pixels be negative numbers but the y pixels might be
>      positive or negative. Just as an example, given a
>      secondary monitor to the left of the main monitor
>      all of its x pixel values will be negative and it's y pixel
>      values might be positive or negative and neither the top
>      nor the bottom of its pixel space is required to line up
>      with that of the main monitor.
> Multiple monitors -- a computer system may have one or
>      more monitors consisting of a main monitor and one or
>      more secondary monitors; any given monitor might be:
>      powered on, powered off, enabled, disabled or
>      disconnected. Monitors may be of different pixel
>      resolutions and secondary monitors may be logically
>      placed (via software) anywhere surrounding the main
>      monitor.
> Oldest project -- that open (regardless of window state)
>      Audacity project which has been opened the longest
>      since this session of Audacity was launched.
> Youngest project -- that open (regardless of window state)
>      Audacity project which has been opened space the least
>      amount of time since this session of Audacity was launched.
>  
> The current situation in Audacity 1.3.10.beta:
>  
> After my recent patch, upon exit, Audacity now deals
> reasonably (though in a minimalistic way) with window
> size and location when writing preferences. If Audacity exits
> while at least one project window is not iconized, the size,
> location and maximized state of the youngest project is stored
> in preferences. If this location is not on the main monitor,
> and the secondary monitor to which that location refers
> is not available when Audacity relaunches, the project window
> will not be visible. I would like to enhance and expand this.
>  
> The proposed situation for Audacity 2.0.1.beta:
>  
> The exit strategy:
>  
> Preferences should store some additional (window) information:
>      Boolean -- respect secondary monitor
>      Boolean -- warn if opening on secondary monitor
>      Boolean -- is iconized
>      wxRect -- "alternate" location and size (if iconized or
>           maximized)
>
> (1) Upon exit, Audacity should walk backwards through the
> project array (youngest to oldest) and determine if any project,
> if reopened, would be completely visible on the main monitor
> (i.e. non-iconized). If such a project is found it should
> immediately be used as the template for storage in preferences.
>
> (2) Else, the "respect secondary monitor" flag should be checked;
> if == NO, the array should again be walked backwards to find
> the 1st project which, if reopened in "normal" (i.e.
> non-iconized) state, would be completely visible on the main
> monitor.
>
> If such a project is found it should immediately be
> used as the template for storage in preferences (noting that we
> store its iconized and maximized state).
>
> Though, if "respect..." == NO and no project is suitable, store
> the defaults (i.e. overwrite any potentially hazardous
> stored preferences -- this will resolve the need to nuke the
> current configuration file simply because the window values
> are hosed).
> If "respect..." == YES the youngest project should be used as
> the preferences template (again, note that we store and respect
> its iconized and maximized state).
>  
> The relaunch strategy:
>  
> Audacity should examine the "respect secondary monitor"
> value and the number of available monitors. The code which
> opens the Main window should ensure that the location
> and size is appropriate given the value of those 2 variables
> (also using something similar to the code in MetaData to
> ensure that the Main window's top edge [i.e. allows dragging]
> and bottom right corner [i.e. allows sizing] are visible on some
> monitor). If not, the Main window should open in the default
> size and position (i.e. on the main monitor). If "warn if..." ==
> YES and the Main window's top edge and resizing gadget
> are not visible on the main monitor issue the warning.
>  
> Add to the context menu of the Audacity taskbar icon:
> "Normalize"
> this will force the youngest project's window to assume the
> default size and position on the main monitor and to become
> visible (if iconized). I am not sure how to do this, but I know
> that it may be done (at least on Windows).
>
>  -Ed Musgrove




------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Ed Musgrove

Re: Proposal for 2.0.1.beta: deal with multiple monitors, iconized and maximized windows

Reply Threaded More More options
Print post
Permalink
----- Original Message ----
> From: Gale Andrews <[hidden email]>
>
> I'm not sure what you mean by "the open forum". Were you going to
> write a Wiki page about these issues?

http://forum.audacityteam.org/index.php


> I'm still very unsure about adding Preferences for a multi-monitor
> warning and whether to always launch on first monitor. I've never
> seen any demands for this (which is not to say they don't exist) and

My personal choice is to honor the user's multi-monitor choice to the
best of Audacity's abilities. If we do not force Audacity to always launch
on the main monitor, as a bare minimum we should ensure that the online
project window opens in a visible location. Nevertheless, I am the new kid
on the block and more than willing to bow to conventional wisdom as
determined by senior team members.


> we didn't do this for the "metadata editor lost on unavailable second 
> monitor problem".

Because the metadata editor has no ability to be iconized nor maximized, it was not
possible for it to be a "never never land" (i.e. x=-32,000, y=-32,000). The patch I
provided only dealt with the "never never land" bug. I consider it an emergency
patch not an elegant solution. On Windows, the metadata editor, when closed on
a secondary monitor reopens on the main monitor.

> I'd just as soon ensure (before 2.0 if safe to do so) that we merely
> solved the worst case that John highlighted where the professor
> shuts down Audacity on his laptop on the second monitor and restarts
> it at home with no second monitor in existence.

I will work on this next.
 
> Have you researched if any other audio editors have such preference
> settings? I imagine pro level video editors may do? 

No, strange as it may seem, given my background, I have never used a
workstation computer based audio editor. I also have the attitude:
be a leader not a follower!

> I wouldn't support "Normalize" in the taskbar context menu.

After giving it some thought, "normalize" was a poor choice. Given that
Notepad uses the term "restore" and most Windows users will be familiar
and comparable with that term (and it should be localized anyway) "restore"
would be my choice.

 -Ed Musgrove


     

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Richard Ash (audacity-help)

Re: Proposal for 2.0.1.beta: deal with multiple monitors, iconized and maximized windows

Reply Threaded More More options
Print post
Permalink
On Fri, 2009-10-09 at 10:11 -0700, Ed Musgrove wrote:
> > Have you researched if any other audio editors have such preference
> > settings? I imagine pro level video editors may do?  
>
> No, strange as it may seem, given my background, I have never used a
> workstation computer based audio editor. I also have the attitude:
> be a leader not a follower!

As far as video goes, Adobe's Premire products assume that your working
space (collected monitors) is a fixed size, as they are normally used on
dedicated desktop workstations (or at least that's the design
mentality). So whilst there extensive tools for laying out the multiple
sub-windows that make up a video edit suite (so you can have a layout,
save it, use it on another project, put it back on this project when you
come back after someone else has changed it ...), I don't think there is
anything for dealing with appearance and loss of multiple monitors apart
from ensuring that windows are always retrievable (so the kind of
off-the-screen check that the metadata editor now has). If you change
your monitor dimensions (what about bigger / smaller monitors?) then you
have to do it by hand.

On my work windows desktop which always has two identical size monitors
attached, it seems to be random which desktop applications, even MS
ones, open on - in some cases the splash screen is on one monitor, then
the application on the other ....

I would disregard completely the "not switched on" scenario - if a
location is within the displayed desktop as far as the computer is
concerned, then it's a legitimate place to put windows, and we shouldn't
be cluttering up the "first" monitor (who said that the primary monitor
was always the visible one, given that both the physical layout and the
task bar location can be changed?) with messages and extra dialogues. If
one of the monitors has been disconnected, then it should also be
disabled and switched off (most systems auto-detect this these days), so
not form part of the desktop, and we won't be putting audacity there.

This leaves only one significant debate, which is whether a preference
to force audacity to always open on the primary monitor is useful. I
don't think it is, but I could be convinced to let it be added (turned
off by default). Personally, I would expect this to be handled at a
window manager level, not in applications, except that very few Windows
users have a window manager that meets their needs.

Richard


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Vaughan Johnson

Re: Proposal for 2.0.1.beta: deal with multiple monitors, iconized and maximized windows

Reply Threaded More More options
Print post
Permalink


Richard Ash wrote:
> On Fri, 2009-10-09 at 10:11 -0700, Ed Musgrove wrote:
>>> ...
>
> I would disregard completely the "not switched on" scenario ...

I agree (as a longtime two-monitor user).

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel