NSWindow: Custom title bar double-click action?

  • Hello,

    When you double click on a window's title bar, the window is
    miniaturized - if the window is miniaturizable. This is not the case
    for HUD windows (or any panels). I have a "mini-HUD" the user can
    enable via the application menu, and would like to set up a custom
    title bar double-click action as a more convenient way to switch to
    this mini-mode. Only problem is I cannot find any documentation on how
    to do this. Any pointers?

    Thanks.
    F.
  • On 1/16/08, <slasktrattenator...> <slasktrattenator...> wrote:
    > Hello,
    >
    > I have a "mini-HUD" the user can
    > enable via the application menu, and would like to set up a custom
    > title bar double-click action as a more convenient way to switch to
    > this mini-mode. Only problem is I cannot find any documentation on how
    > to do this. Any pointers?

    Why are you redefining this behavior?  I double-click to minimize
    things all the time; your app would frustrate me and I would not use
    it.  I don't care why you think your behavior is superior, I (and your
    users) will not tolerate your disdain for established behavior.

    Instead you might want to consider how iTunes overrides the zoom
    button behavior to switch to its mini-mode.  Note that it still lets
    you double-click on the mini-mode window's surface to minimize to the
    dock.  Override -[NSWindow performZoom:] to implement this behavior.

    --Kyle Sluder
  • Well, as I said, a HUD window does not have minimize button, so no one
    would expect the window to minimize when double-clicking the title
    bar. Overriding the zoom button would be nice, but there's no zoom
    button either on a HUD window, so there's really nothing left to toy
    with except for the title bar. Why would a redefinition like this be
    any more "frustrating" than iTunes redefinition of the zoom button?

    On Jan 16, 2008 11:38 PM, Kyle Sluder <kyle.sluder+<cocoa-dev...> wrote:
    > On 1/16/08, <slasktrattenator...> <slasktrattenator...> wrote:
    >> Hello,
    >>
    >> I have a "mini-HUD" the user can
    >> enable via the application menu, and would like to set up a custom
    >> title bar double-click action as a more convenient way to switch to
    >> this mini-mode. Only problem is I cannot find any documentation on how
    >> to do this. Any pointers?
    >
    > Why are you redefining this behavior?  I double-click to minimize
    > things all the time; your app would frustrate me and I would not use
    > it.  I don't care why you think your behavior is superior, I (and your
    > users) will not tolerate your disdain for established behavior.
    >
    > Instead you might want to consider how iTunes overrides the zoom
    > button behavior to switch to its mini-mode.  Note that it still lets
    > you double-click on the mini-mode window's surface to minimize to the
    > dock.  Override -[NSWindow performZoom:] to implement this behavior.
    >
    > --Kyle Sluder
    >
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today