Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

WIN: UI shakes and flickers a lot when resizing Brackets window by dragging #4841

Open

Description

@dalcala

Description:
On Windows, the UI shakes & flickers a lot when you resize the Brackets window by dragging the top edge or the left edge of the Brackets window. The problem is much less noticeable when dragging the bottom edge or right edge. It's really noticeable if you have multiple inline color editors open. I tried making a Jing screen capture video, but the jiggle isn't picked up in the video. Maybe related to #1741?

keywords: jumpy, choppy, jiggles, jumps

Repro using Brackets Sprint 29 on Win 7. UTR on Mac 10.8.

Repro steps:

  1. Open a css file and invoke inline color editor in multiple places. Also happens with an html file.
  2. Resize the Brackets window by dragging the top edge or the left edge of the Brackets window.

Actual results:
UI shakes and flickers a lot.

Expected results:
UI doesn't shake and flicker a lot.

Workaround:
Deal with cosmetic issue.

Activity

  1. gruehle commented on Aug 26, 2013

    @gruehle
    Member

    Reviewed. Medium priority to @JeffryBooher

  2. rajeshsegu commented on Aug 30, 2013

    @rajeshsegu

    We could throttle the call of the resize handler once every 100ms. ( http://underscorejs.org/#throttle ). Today in a given second its fired close to 100+ times which is waste of DOM cycles. Meanwhile, the flicker is also related to CodeMirror resizing their code very often, we can sync them both at once is 200ms, which I think is reasonable.

  3. redmunds commented on Nov 16, 2013

    @redmunds
    Contributor

    @dalcala I remember this being really bad. I'm not sure what changed, but this seems way better to me now on Win7. Are you still seeing the problem?

  4. peterflynn commented on Mar 18, 2014

    @peterflynn
    Member

    Removing top/left from title since you can see this with any resize (and same with #5258)

  5. changed the title [-]Win: UI shakes and flickers a lot when resizing Brackets window by dragging from top edge or left edge[/-] [+]Win: UI shakes and flickers a lot when resizing Brackets window by dragging[/+] on Mar 18, 2014
  6. JeffryBooher commented on May 27, 2014

    @JeffryBooher
    Contributor

    Adding CEF/TRACKING -- although this could be solved in shell or more efficient DOM

  7. changed the title [-]Win: UI shakes and flickers a lot when resizing Brackets window by dragging[/-] [+][CEF 2171] WIN: UI shakes and flickers a lot when resizing Brackets window by dragging[/+] on Nov 18, 2014
  8. JeffryBooher commented on Nov 18, 2014

    @JeffryBooher
    Contributor

    WOW. This got incredibly worse with CEF 2171

  9. added this to the Release 1.1 milestone on Nov 18, 2014
  10. removed their assignment
    on Nov 18, 2014
  11. JeffryBooher commented on Nov 21, 2014

    @JeffryBooher
    Contributor
  12. peterflynn commented on Dec 3, 2014

    @peterflynn
    Member

    @JeffryBooher I'm not seeing a regression here with CEF 2171. On Win 7, it actually seems to respond to resizing more smoothly and quickly than CEF 1547.

  13. RaymondLim commented on Dec 3, 2014

    @RaymondLim
    Contributor

    @peterflynn In CEF 2171 I can see the flickering in the area covered by the border, title bar and the menu bar, but not in the side bar or the editor area.

  14. peterflynn commented on Dec 4, 2014

    @peterflynn
    Member

    I busted out the trusty high-speed camera for a quick test.

    • When resizing the window smaller, there's repaint fighting in both versions: it appears that the CEF content is sometimes drawn on top of our custom window border, like the CEF widget itself is not resized synchronously with the window resize event. This means sometimes the window border is basically invisible -- to the naked eye this looks like flicker/jitter. This is worse in 2171 (i.e. it happens in more of the frames), but it is present in 1547 too.
    • When resizing the window larger, the "gaps" are handled differently. 2171 doesn't paint any background fill in the blank areas where CEF hasn't expanded yet, leaving an old copy of the border still visible. Later, once CEF has finished its layout update, it repaints larger and overwrites the old border. To the naked eye, this looks like jitter because the apparent thickness of the border keeps fluctuating. In contrast, 1547 paints a light blue solid fill synchronously with the window resize, so there's never two copies of the border visible at once.

    It seems like these are both things we could fix on our end:

    • It seems like we should be able to resize CEF's paint/clip region immediately upon resize, even if the HTML/JS layout inside it isn't done updating -- that should ensure CEF never repaints on top of the non-client region.
    • We could draw a solid-color window bg ourselves, to mimic the synchronous gap-filling seen in 1547.

    However, I'll reiterate that to my eyes, the jitter is only a tiny bit worse than 1547 and seems reasonable enough to ship with.

  15. peterflynn commented on Dec 4, 2014

    @peterflynn
    Member

    I also checked cefclient 2171 just for kicks. The CEF content is way less responsive to resizing overall (I'm guessing because cefclient is always a debug build?), but it doesn't show either of the problems above. But I'm not sure if it's doing anything specific to repaint the border better, or if that's just something you get for free if you're using the OS-standard Aero border instead of painting your own.

  16. JeffryBooher commented on Dec 5, 2014

    @JeffryBooher
    Contributor

    @peterflynn the installed build seems to paint much faster than my "debug" build so I'm going to lower-the priority on this one for now and remove the milestone.

  17. removed this from the Release 1.1 milestone on Dec 5, 2014
  18. changed the title [-][CEF 2171] WIN: UI shakes and flickers a lot when resizing Brackets window by dragging[/-] [+]WIN: UI shakes and flickers a lot when resizing Brackets window by dragging[/+] on Dec 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions