qpdfview window keeps growing

Forum Forums General Software qpdfview window keeps growing

  • This topic has 11 replies, 6 voices, and was last updated Nov 8-4:56 pm by anti-apXos.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #122242
    Member
    hughtmccullough

      After trying a few pdf readers I have been using qpdfview as it seems to best match my needs. However, it has one quirk that is becoming increasingly annoying.
      Every time I open qpdfview or open a new file in it, the top left corner of the window is positioned in the same place. However, the bottom right corner is sometimes lower and further to the left than it was the previous time. This means that the window size keeps getting bigger. Not only that but it keeps moving off the edge of the screen so that I can’t click on the X in the corner to close it. I am constantly resizing the window to get it back on the screen.
      Does anyone know why this is happening or, more importantly, how to avoid it happening.
      I am using Antix 21 with kernel 4.19.0-256-antix.1-amd64-smp and IceWM.

      #122246
      Moderator
      Brian Masinick

        @hughtmccullough

        I cannot be 100% certain of this, but there is a possibility that a few size or geometry settings, but not ALL of them, are set in some of the “hidden” configuration files, those with period (dot) prefixes. If that is the case, it could be the initial x and y coordinates, but not the full geometry; if the FULL geometric spec for this app were explicitly specified in a resource, it would result in the app appearing in the same location.

        The standard X resource files are .Xresources and .Xdefaults; hidden resource files for a specific app are possible, or the resources can be explicitly referenced by name in either of the two files I just noted.

        https://wiki.archlinux.org/title/X_resources provides some explanation; you may have to do some digging if you want the specific resource names for the app you are interested in; I’m not personally familiar with that app; I just know about X resource specifications in general; hopefully this will help some; maybe someone else has better, more specific information that will help you out further…

        --
        Brian Masinick

        #122262
        Member
        Xunzi_23

          High Hugh*
          Opening an empty window of fixed size is easy, problem is that PDF documents are not all same size or format.
          Big problem is, a (a1,a2,a3,a4 a5 u.a.sizes are common,
          we then have US sizes and UK weird special dimensions on top.

          Automatic Scaling is I assume too much code to incorporate and keep the viewer lightweight.
          There was a bug report about the issue you describe, I think it was left not fix as too difficult.

          https://launchpad.net/qpdfview is the project homepage. You can contact devs there.

          #122265
          Member
          anti-apXos

            I cannot reproduce this problem in iceWM on antiX-23. Even when opening documents that have different page sizes, the window always comes up with the same geometry it had when I last closed it. If the page size is larger and the scaling is set to original size, there’s scrollbars.

            It seems to me like this would be something determined by the window manager anyway, wouldn’t it? Does iceWM have a preferences setting to remember window geometry that may be disabled for Hugh? I searched in ~/.icewm/preferences, but didn’t find anything.

            As a last resort, you could add an entry to ~/.icewm/winoptions like this

            qpdfview.qpdfview.geometry: 683x706+683+31
            

            That’s sized and placed for my 1366×768 screen. To get the geometry that you prefer, just move and resize the window so that it’s how you want it, noting the geometry shown in the status dialog that appears at the top of the screen and put those values in the winoptions file.

            There ought to be a better solution, though, since I don’t have the issue on my system. I am using antiX-23, though it doesn’t seem like thay should matter.

            #122520
            Member
            hughtmccullough

              Thanks for the replies. I haven’t been able to get to the bottom of this in terms of understanding why it is happening. However, the work-around in the last post works for me. So, I think I will leave it at that. At least I have learnt a new trick that could be useful in the future.

              #122522
              Member
              hughtmccullough

                I should qualify my last post. When I first open qpdfview it follows the definition set by qpdfview.qpdfview.geometry. On opening subsequent files the bottom right corner of the window can drift down and right a bit but I have allowed for that in setting the dimensions of the window and so far it always goes back to the same starting point when qpdfview is restarted. So, it is still buggy but much more workable.

                #122628
                Member
                Xunzi_23

                  On opening subsequent files, if there is a bug then that can only be assessed by opening the same file many times,
                  Files are often not exactly same size, the opening setting can not controll later variations or enable a shrink
                  or grow to fit as that is not implemented in qpdfview.

                  Should the window keep changing dimensions when using exactly the same unchanged file repeatedly please file a report to
                  the devs. For testing is make the file immutable, i.e. read only.

                  #122653
                  Member
                  hughtmccullough

                    Xunzi_23, thanks for your interest. I had decided to leave things as they now are, as I had an acceptable solution but I decided to probe further in response to your post.
                    First of all, it seems that I have misled you (and myself). The window actually changes size before the second file is opened. I have tried to break it down:

                    I have set the geometry of the qpdfview window in ../.icewm/winoptions. When I open a pdf file by clicking on it in a file manager (usually SpaceFM), qpdfview opens and displays the file and the window size seems to be as specified in winoptions. The same is true if I open qpdfview directly, say from a command line, without specifying any file.

                    I then have different options to open another file – I could click on another file in SpaceFM or use the Open menu from within qpdfview. When doing either of these, the bottom right corner of the window moves down and right BEFORE the file is actually opened. It moves as soon as I click on the Open menu or as soon as I move the focus to another window outside qpdfview. I hadn’t noticed this before.

                    Prior to me setting the geometry in winoptions, qpdfview would always open with the same size of window as it had when it was last closed. This means if I was using qpdfview and left it to do something else the window would grow and it would retain the new size when it was closed and re-opened. Every time it was used it would grow by another increment until it moved off the edge of the desktop, forcing me to resize it.

                    Now, with the geometry set in winoptions, qpdfview always opens with the geometry I have set. So, even though it grows a bit when I move to another application, it always restarts with the correct geometry and never grows enough to go off the edge of the desktop.

                    This is consistently repeatable on my computer. I don’t know if I have done enough for you to class it as a bug but it is the only application I have ever come across that allows the active window to regularly grow off the edge of the screen/desktop so that the controls can’t be accessed.

                    #122660
                    Member
                    Xunzi_23

                      Hi again hughtmccullough, looking for options, at https://www.mankier.com/1/qpdfview
                      Maybe the below –unique option can cause less irritation. SM Tube is sort of opposite on my setup, it moves to top left then after a few videos is off the screen. Which is just as weird.
                      Makes me wonder if the effect might be driven by QT.

                      –unique
                      If an instance of qpdfview is started with this option, any files that are opened using this option afterwards, are opened as tabs in the original window. If a file is already opened in a tab of the original window, it is merely reloaded.

                      #122838
                      Member
                      wildstar84

                        Regarding the SM Tube issue, this may be a window-mgr issue I’ve run into repeatedly due to non-clearly defined standards. MOST WMs position windows using the upper left corner of the actual window EXCLUDING the titlebar and frames, but some like AfterStep, which I use position the window using the upper-left corner above the titlebar decoration. I prefer this approach as it avoids the titlebar and left frame side being off the screen when positioning a window at (0,0), but this causes many Qt and SDL windows to “walk” up (and left) by the height of the titlebar and width of any left frame decoration each time the window’s coordinates are saved, window closed, then re-opened. This isn’t likely any help, but at least explains the possible reason. You might be able to mitigate this by letting the WM control the window’s start position via your WM’s settings (PPOSITION or GEOMETRY) taylored for the window by WM_CLASS/WM_NAME, however, this will result in the window always starting at the same position.

                        #122846
                        Member
                        PPC

                          @hughtmccullough – What I’m, going to say is not related to qpdfview… You said you tested severl pdf readers. Currently most modern browsers, like firefox-esr, firefox and probably all chromium based browsers are pretty decent pdf viewers, with some very handy edition capabilities. It may be overkill to open a browser just to read a pdf file, if you have an underpowered computer, but if you already have the browser open, using it to view pdf files is quite fast and avoids the problem you have will qpdfview.

                          P.

                          #122933
                          Member
                          anti-apXos

                            @hughtmccullough, thanks to your detailed description, I was able to reproduce the problem you’re having on my system as well. Once a qpdfview window is open, unfocusing that window for any reason (such as switching to another window or bringing up any qpdfview dialog) causes it to grow. This only happens once per qpdfview session, but will repeat again the next time you open a qpdfview window and then unfocus it. In my case, the window only ever grows in height, not width, and the increase is exactly 107 pixels each time, regardless of the page size or format. It does not happen if the window is resized manually before being unfocused.

                            I could only replicate the issue in iceWM, which suggests that @wildstar84’s explanation may be somehow applicable even though the window growth is in the opposite direction. I feel like it’s worth reporting this on the qpdfview bugtracker linked earlier unless it’s the same one that @Xunzi_23 mentioned. I wasn’t able to find that bugreport, though, do you have a direct link, @Xunzi_23? Maybe it’s really an icewm bug, though, anyway. I’m not sure.

                            Another partial solution is to set LimitSize (and maybe also LimitPosition) to 1 in ~/.icewm/preferences. This will give you some more flexibility than the winoptions setting, but still shrink the window back to screen limits whenever a new one is opened. These settings affects all windows, though, not just qpdfview.

                            Having the qpdfview window maximized also prevents it from growing outside the screen, but that may not be a good option depending on your screen size.

                          Viewing 12 posts - 1 through 12 (of 12 total)
                          • You must be logged in to reply to this topic.