|
From: Daniel J S. <dan...@ie...> - 2015-11-27 09:12:35
|
On 11/27/2015 02:22 AM, Daniel J Sebald wrote: > On 11/26/2015 11:05 PM, pl...@pi... wrote: [snip] >> It may be specific to lsdm but I suspect gnuplot is not setting ( or >> mis-setting ) some window parameter, ie providing the plot window >> coordinates instead of the frame coordinates. > > My guess is that's not the issue, at least not as simple as providing > the wrong coordinates in the wrong spot. > > This comment in QtGnuplotWidget.cpp is slightly suspicious: > > // Qt has no reliable mechanism to set the size of widget while having > // it resizable. So we heuristically use the resize function to set the > // size of the plotting area when the plot window is already displayed. > // When the window is not yet displayed, this does not work because the > // window messes up with its content sizes before showing up. In this > // case, we use the sizeHint mechanism to tell the window which size we > // prefer for the plotting area. On MacOS, it looks like QMainWindow > // forgets the status bar area when it layouts its contents. This makes > // the plot area 14 pixels too small in the vertical direction when the > // plot window is first displayed. > > It mentions that MacOS has a similar type of problem. I'm wondering if > the Qt external app is asking for layout at a time when the WM doesn't > know what the final decorations are going to look like, then the OS > items for the QMainWindow are added and then happen to be outside the > screen when displayed. It could be that other WMs are doing that too, > but when they position they place the window not at the edge of the > screen but somewhere near. > > The code is probably overlooking some more proper way of doing the > layout in Qt. Something in which the WM has full knowledge of the title > bar presence. Let's try something simple first. Attached is a patch which simply reverses the order of showing the window and updating the geometry. Please try that. Dan |