Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-30762

Toplevel window move jitter on OSX

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P3: Somewhat important
    • None
    • 4.8.4
    • GUI: Window management
    • None
    • OSX 10.8.3, Qt 4.8.4
    • macOS

    Description

      The following lines in qwidget_mac.mm cause (IMHO) unacceptable jitter when programmatically moving a toplevel window:

      4543    // The window is moved and resized (or resized to zero).
      4544	// Since Cocoa usually only sends us a resize callback after
      4545	// setting a window frame, we issue an explicit move as
      4546	// well. To stop Cocoa from optimize away the move (since the move
      4547	// would have the same origin as the setFrame call) we shift the
      4548	// window back and forth inbetween.
      4549	cocoaFrameRect.origin.y += 1;
      4550	[window setFrame:cocoaFrameRect display:realWindow];
      4551	cocoaFrameRect.origin.y -= 1;
      4552	[window setFrameOrigin:cocoaFrameRect.origin];
      

      To reproduce, simply create a toplevel window and implement the appropriate mouse event handlers to move the window from a mouse drag in the client area (as opposed to the native title bar). The resulting move will oscillate +- 1px because of the code above, resulting in unsightly jitter.

      Moving windows in this fashion is a requirement for toplevel frameless windows which implement their own title bars and window decorations (ala google chrome).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            sccolbert Chris Colbert
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes