|
From: Daniel J S. <dan...@ie...> - 2014-04-04 03:02:29
|
On 04/03/2014 04:37 PM, Ethan A Merritt wrote: > On Thursday, 03 April, 2014 22:00:37 Allin Cottrell wrote: >> On Thu, 3 Apr 2014, Ethan A Merritt wrote: >> >>> At some point between 4.6 and current CVS, the initial placement of >>> Qt plot windows has changed. >>> >>> It used to be that the Qt plot window would open nicely in some unoccupied >>> part of the screen, probably because that is how I set the window manager >>> policy. >>> >>> Now it always opens in the center of the screen, which is probably the >>> worst possible place. Changing the window manager placement policy >>> has no effect. >>> >>> How can we restore the previous behaviour? >> >> For the few months I've been running Arch linux, using whichever gnuplot >> 4.6 variant was current in the Arch repositories (right now, 4.6.5). The >> Qt terminal is apparently the default on Arch (maybe not unconditionally, >> but seems to be the case if the Qt libraries are installed; I have Qt >> 4.8.5). >> >> On that basis I'm afraid I can't agree that the gnuplot 4.6 behavior is to >> "open [Qt windows] nicely in some unoccupied part of the screen". On my >> system the Qt gnuplot windows open partially off-screen: I have to move >> them inboard to see the whole plot. I'm not sure whether opening in the >> center of the screen would be better or worse! > > Somewhat tangential since I'd still like to know what changed... > > Mojca has requested, and I very much agree, that when you manually > adjust the plot window size it should be saved and reused when you next > open a plot window. Alternatively there could be an explicit > "save current window geometry" in the tools widget. > > I am told this is unreasonably hard in Qt, but even so that is what I would like > to have. I put a patch that retains size and location here: https://sourceforge.net/p/gnuplot/patches/663/ and Jérôme has upgraded the patch. There are still some inconsistencies in the patch that need to be resolved (see comments...probably needs to be raised on discussion list), but I think both of us might be too busy at the moment. Feedback is welcome though. As for placement, if there is something in the code that is forcing the QWindow to be centered, then that could be removed. Otherwise, it seems inherent in desktop management that the Window not have much control over position. The only way would be to get information from the desktop somehow about what is occupying the screen... actually, I just found this: https://qt-project.org/doc/qt-4.7/qdesktopwidget.html so maybe there is more access to info than we believe. Dan |