Issue 98949 - Command-M fails to minimise windows to Dock
Summary: Command-M fails to minimise windows to Dock
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: DEV300m41
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: OOo 3.2
Assignee: philipp.lohmann
QA Contact: issues@framework
URL:
Keywords:
: 92016 (view as issue list)
Depends on:
Blocks: 99080
  Show dependency tree
 
Reported: 2009-02-06 06:34 UTC by Graham Perrin
Modified: 2009-11-05 10:43 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Patch to implement Cmd-M and Cmd-Option-M (1.11 KB, text/plain)
2009-02-25 12:12 UTC, rvojta
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Graham Perrin 2009-02-06 06:34:14 UTC
Command-M fails to minimise windows in Base, Calc, Draw, Impress and Writer.

Apple HIG: Window Behaviour: Minimizing and Expanding Windows
http://tinyurl.com/apple-hig-windows-minim-expand
http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGWindows
/chapter_18_section_5.html#//apple_ref/doc/uid/20000961-TPXREF25

> When the user clicks the minimize button, double-clicks the title
> bar, or presses Command-M, the window minimizes into the Dock.
Comment 1 philipp.lohmann 2009-02-06 09:27:42 UTC
accepted
Comment 2 eric.bachard 2009-02-10 19:17:44 UTC
This issue blocks issue 99080
Comment 3 rvojta 2009-02-16 08:55:12 UTC
@pl: I modified Cmd-M to Ctrl-M in macshortcuts01 to test Ctrl support. Probably
we can stay with Ctrl-M?
Comment 4 philipp.lohmann 2009-02-16 09:35:27 UTC
rvojta: That depends on what you mean by that :-) If you are saying you changed
the shortcut for "default formatting" to mod3-M, then yes that's what we should
do. Cmd-M needs to be handled in vcl/aqua/source/app/vclnsapp.mm just where
Cmd-W gets handled now. My plan was to add add soemthing like

if( ([pFrame->getWindow() styleMask] & NSMiniaturizableWindowMask) )
{
    if( nModMask == NSCommandKeyMask
        && [[pEvent charactersIgnoringModifiers] isEqualToString: @"m"] )
    {
        [pFrame->getWindow() performMiniaturize: nil];
        return;
    }
}

behind the pace where Cmd-W is handled. By the way, there is a comment in there
that says, Cmd-W should be handled by framework; that comment is not valid on
second thought since there are cloasable (and miniaturizable) windows in OOo
that don't have a menu, so currently we really need this handling in vcl.
Comment 5 rvojta 2009-02-16 09:42:29 UTC
@pl: I just proposed new shortcut instead of Cmd-M and informed you that it is
already done in macshortcuts01. Nothing more, nothing less.

And to Cmd-M proposal, I agree, I was thinking about the same thing. And one
additional thing:

 Cmd-M        - should minimize active window
 Cmd-Option-M - should minimize all application windows
Comment 6 philipp.lohmann 2009-02-16 09:54:15 UTC
Sorry, just in the context of this issue I though a reader might misinterpret
that you want to minimize a window on Ctrl-M. For minimizing all windows: would
you suggest using [NSApp miniaturizeAll] or also [NSApp hide] ? I mean is
miniaturizing everything usually the same as hiding the app ?

Thank you for your efforts on this issue !
Comment 7 rvojta 2009-02-16 10:38:18 UTC
@pj: miniaturizeAll, because it is HIG compliant and hide is already assigned to
Cmd-H (see menu item OpenOffice.org - Hide & Hide others).

The difference between these two are in dock (from user point of view). When you
do minimizeAll, all windows are minimized to dock and they are visible there.
When you do hide application, windows are not visible on desktop and they're not
visible in dock too. Only application is there.
Comment 8 rvojta 2009-02-25 12:12:04 UTC
Created attachment 60473 [details]
Patch to implement Cmd-M and Cmd-Option-M
Comment 9 rvojta 2009-02-25 12:12:58 UTC
@pl: Is this patch ok with you? I just tested it and it works - Cmd-M and Cmd-Option-M for Miniaturize 
and Miniaturize All.
Comment 10 philipp.lohmann 2009-02-25 12:19:51 UTC
Yes, that's great. Thanks, I didn't come around to doing that yet. Please commit
it to macshortcuts01 if you like.
Comment 11 philipp.lohmann 2009-02-25 12:20:36 UTC
changing type
Comment 12 rvojta 2009-02-25 12:26:21 UTC
Fixed in macshortcuts01 CWS
Comment 13 philipp.lohmann 2009-03-03 10:37:32 UTC
verified in CWS macshortcuts01
Comment 14 philipp.lohmann 2009-06-29 18:57:24 UTC
integrated
Comment 15 philipp.lohmann 2009-11-05 10:43:28 UTC
*** Issue 92016 has been marked as a duplicate of this issue. ***