Details
-
Bug
-
Resolution: Won't Do
-
P3: Somewhat important
-
None
-
4.8.4
-
None
-
OSX 10.8.3, Qt 4.8.4
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).