From: Daniel J S. <dan...@ie...> - 2015-11-27 08:31:19
|
On 11/26/2015 11:05 PM, pl...@pi... wrote: > On 26/11/15 21:56, Ethan A Merritt wrote: >> >> >> >> On Thu, 26 Nov 2015, Daniel J Sebald wrote: >> >>> On 11/26/2015 05:41 AM, pl...@pi... wrote: >>>> On 26/11/15 07:49, Daniel J Sebald wrote: >>>>> On 11/25/2015 04:57 PM, pl...@pi... wrote: >>>>>> Hi, >>>>>> >>>>>> I have just built current CVS and was quickly testing qt. ( built >>>>>> with >>>>>> qt5 ) >>>>>> >>>>>> Terminal type set to 'qt' >>>>>> gnuplot> plot sin(x*2.0*pi) >>>>>> >>>>>> >>>>>> It works and resizes cleanly but the window is stuck up against the >>>>>> top >>>>>> left corner of the screen and I do not have a title bar on it. >>>>>> >>>>>> No means to move the window and no close button to get rid of it. >>>>>> >>>>>> Built on Fedora23 LXDE spin installation. >>>>> >>>>> Isn't there some type of dock you can put on the desktop that will >>>>> allow >>>>> minimizing applications? Does that work properly with the window? >>>>> >>>>> I'm not sure if many have been using qt5. Typically it is qt3 or qt4 >>>>> that is used. Unless you need qt5 for something else, try removing qt5 >>>>> from your installed software and run ./configure once again. See if >>>>> the >>>>> system finds qt4 and builds. >> >> qt5 has been fully supported for a long time now. I have never seen any >> gnuplot problems specific to the qt version, other than finding the right >> libraries to link when building it. >> >>>> yes, the minimise tool works. The configuration tool gets a proper >>>> window with title bar and buttons. Save_As dialogue is normal. Just the >>>> plot window is missing normal title bar. >> >> I don't think I understand the description. Are you saying that >> you are getting a plot window that is not embedded in the same frame >> as the toolbar widgets? >> >> Ethan >> >> >> > > No, I was referring to the pop-up window you get when clicking on the > spanner icon: that is normal with title bar. > > The problem is with the main plot window. It is connected to the boolbar > but the two a stuck at the top left corner of the screen > > Ah! In attempting to get more detail on the question of the frame , I've > found out what was happening. The WM was placing the window with the top > of the toolbar at the edge of the screen , thus hiding the titlebar off > screen, meaning the window could not be moved. I still had the right and > bottom frames to resize but could not get off top-left corner. > > I managed to grab the top right frame corner and resized downwards at > which point I realised the titlebar was there but not accessible. > > Now it is placing the new plot windows bottom-right instead. > > This may be a DM quirk with lxdm but I have not seen any odd behaviour > with other programs All other windows fall within the visible screen and > respect the window free margins defined in the DM ( I use 10 px right > hand side margin for mouse scrolling between desktops ). I use 5 > desktops and slide windows from one to the other without issues. > > 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. Dan |