setWantsLayer causes text fields to draw focus ring incorrectly

  • Merely by telling my window's contentView to setWantsLayer: YES, the text
    fields in that window are no longer drawing their focus ring correctly (a
    thin blue line appears inside the field, but the thick blue line outside the
    field is no longer drawn). What can I do about this? Thx - m.

    --
    matt neuburg, phd = <matt...>, <http://www.tidbits.com/matt/>
    A fool + a tool + an autorelease pool = cool!
    One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
    AppleScript: the Definitive Guide - Second Edition!
    <http://www.amazon.com/gp/product/0596102119>
  • On 12/17/07 3:32 PM, Matt Neuburg said:

    > Merely by telling my window's contentView to setWantsLayer: YES, the text
    > fields in that window are no longer drawing their focus ring correctly (a
    > thin blue line appears inside the field, but the thick blue line outside the
    > field is no longer drawn). What can I do about this? Thx - m.

    Similarly, NSPathControl does not draw correctly when layers are on.
    And other views too.  :(  After seeing that merely flipping this BOOL
    caused so many problems, I decided to wait until 10.5.x before playing
    with it more.

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada
  • > On 12/17/07 3:32 PM, Matt Neuburg said:
    >
    >> Merely by telling my window's contentView to setWantsLayer: YES, the text
    >> fields in that window are no longer drawing their focus ring correctly (a
    >> thin blue line appears inside the field, but the thick blue line outside the
    >> field is no longer drawn). What can I do about this? Thx - m.
    >
    > Similarly, NSPathControl does not draw correctly when layers are on.
    > And other views too.  :(  After seeing that merely flipping this BOOL
    > caused so many problems, I decided to wait until 10.5.x before playing
    > with it more.

    Besides seeing the focus ring problem, too, I have one more effect to contribute: I gave a view inside a split view the wantsLayer attribute. This view in turn contains a table view, which is resized together with its container view. Now while resizing the pane with the mouse, the table view starts to flicker during redraw. That is, it draws its background, makes that visible, then draws the content text for each move of the mouse.

    The split view is custom made, so it is possible that the problem does not happen with NSSplitView, but I doubt it. All I do is calling [pane setFrame].

    Lets hope for 10.5.x (x > 1)

    Best
    Kai
  • On 19/12/2007, at 3:30 AM, Kai Brüning wrote:
    >> On 12/17/07 3:32 PM, Matt Neuburg said:
    >>
    >>> Merely by telling my window's contentView to setWantsLayer: YES,
    >>> the text
    >>> fields in that window are no longer drawing their focus ring
    >>> correctly (a
    >>> thin blue line appears inside the field, but the thick blue line
    >>> outside the
    >>> field is no longer drawn). What can I do about this? Thx - m.
    >>
    >> Similarly, NSPathControl does not draw correctly when layers are on.
    >> And other views too.  :(  After seeing that merely flipping this BOOL
    >> caused so many problems, I decided to wait until 10.5.x before
    >> playing
    >> with it more.
    >
    > Besides seeing the focus ring problem, too, I have one more effect
    > to contribute: I gave a view inside a split view the wantsLayer
    > attribute. This view in turn contains a table view, which is resized
    > together with its container view. Now while resizing the pane with
    > the mouse, the table view starts to flicker during redraw. That is,
    > it draws its background, makes that visible, then draws the content
    > text for each move of the mouse.
    >
    > The split view is custom made, so it is possible that the problem
    > does not happen with NSSplitView, but I doubt it. All I do is
    > calling [pane setFrame].
    >
    > Lets hope for 10.5.x (x > 1)

    To add to this, I've used setWantsLayer: (toggled in IB) for a little
    container view which contains some buttons. Sometimes for no apparent
    reason, some of the buttons would show up and the others wouldnt. It
    would change from day to day. It seems a little buggy to say the least.
previous month december 2007 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